Package cnuphys.swimtest
Class SwimTest
java.lang.Object
cnuphys.swimtest.SwimTest
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
locDiff
(double[] v1, double[] v2) Compute the distance between two vectorsstatic double
locDiff
(double[] v1, SwimZStateVector szv) Compute the distance between a vector and a SwimZStateVectorstatic void
main programstatic void
memoryReport
(String message) Print a memory reportstatic void
printSummary
(String message, int nstep, double momentum, double[] y, double[] hdata) static void
printSummary
(String message, int nstep, double momentum, double theta0, SwimZStateVector sv, double[] hdata) static void
printSwimZ
(SwimZStateVector v, String s) Print a vector to the standard outputstatic void
Print a vector to the standard outputstatic void
Print a vector to the standard outputstatic double
Computer a random double between two limitsstatic void
main program
-
Constructor Details
-
SwimTest
public SwimTest()
-
-
Method Details
-
memoryReport
Print a memory report- Parameters:
message
- a message to add on
-
printSwimZ
Print a vector to the standard output- Parameters:
v
- the double vectors
- an info string
-
printSwimZCM
Print a vector to the standard output- Parameters:
v
- the double vectors
- an info string
-
printVect
Print a vector to the standard output- Parameters:
v
- the double vectors
- an info string
-
randVal
Computer a random double between two limits- Parameters:
min
- the min valuemax
- the max valuerand
- the generator- Returns:
- a random double between two limits
-
locDiff
public static double locDiff(double[] v1, double[] v2) Compute the distance between two vectors- Parameters:
v1
- the first vectorv2
- the second vector- Returns:
- the euclidean distance between two vectors
-
locDiff
Compute the distance between a vector and a SwimZStateVector- Parameters:
v1
- the vector (in m)szv
- the SwimZStateVector (assumed in cm)- Returns:
- the euclidean distance between two vectors in meters
-
printSummary
public static void printSummary(String message, int nstep, double momentum, double[] y, double[] hdata) -
printSummary
public static void printSummary(String message, int nstep, double momentum, double theta0, SwimZStateVector sv, double[] hdata) -
Xmain
main program- Parameters:
arg
- command line arguments (ignored)
-
main
main program- Parameters:
arg
- command line arguments (ignored)
-