From f3b19e381097c01c1abb119e91487191d7e2ef5e Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Tue, 27 Mar 2012 16:48:27 +0200 Subject: Implement more general Poisson series. --- org/madore/ephem/Comput.java | 91 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 14 deletions(-) (limited to 'org/madore/ephem') diff --git a/org/madore/ephem/Comput.java b/org/madore/ephem/Comput.java index 214d5e8..77e305b 100644 --- a/org/madore/ephem/Comput.java +++ b/org/madore/ephem/Comput.java @@ -1,7 +1,7 @@ package org.madore.ephem; import java.util.List; -import java.util.ArrayList; +import java.util.HashMap; import java.util.Arrays; public final class Comput { @@ -75,7 +75,7 @@ public final class Comput { for ( int i=0 ; i tms; + public SumPoisson2Terms(List tms) { + super(tms); + this.tms = tms; + } + public SumPoisson2Terms(Poisson2Term[] tms) { + this(Arrays.asList(tms)); + } + public double v(double t) { + double z = 0; + final int npow = 6; + double[] tpow = new double[npow]; + for ( int d=0 ; d fncache = new HashMap(); + for ( int i=0 ; i tms; public SumPoissonTerms(List tms) { @@ -182,17 +245,17 @@ public final class Comput { public double v(double t) { double z = 0; final int npow = 6; - List tpow = new ArrayList(npow); + double[] tpow = new double[npow]; for ( int d=0 ; d