Class SwimTest
java.lang.Object
cnuphys.swimtest.SwimTest
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublelocDiff(double[] v1, double[] v2) Compute the distance between two vectorsstatic doublelocDiff(double[] v1, SwimZStateVector szv) Compute the distance between a vector and a SwimZStateVectorstatic voidmain programstatic voidmemoryReport(String message) Print a memory reportstatic voidprintSummary(String message, int nstep, double momentum, double[] y, double[] hdata) static voidprintSummary(String message, int nstep, double momentum, double theta0, SwimZStateVector sv, double[] hdata) static voidprintSwimZ(SwimZStateVector v, String s) Print a vector to the standard outputstatic voidPrint a vector to the standard outputstatic voidPrint a vector to the standard outputstatic doubleComputer a random double between two limitsstatic voidmain 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)
-