Package cnuphys.swimtest
Class SwimTest
java.lang.Object
cnuphys.swimtest.SwimTest
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
SwimTestpublic SwimTest()
 
- 
- 
Method Details- 
memoryReportPrint a memory report- Parameters:
- message- a message to add on
 
- 
printSwimZPrint a vector to the standard output- Parameters:
- v- the double vector
- s- an info string
 
- 
printSwimZCMPrint a vector to the standard output- Parameters:
- v- the double vector
- s- an info string
 
- 
printVectPrint a vector to the standard output- Parameters:
- v- the double vector
- s- an info string
 
- 
randValComputer a random double between two limits- Parameters:
- min- the min value
- max- the max value
- rand- the generator
- Returns:
- a random double between two limits
 
- 
locDiffpublic static double locDiff(double[] v1, double[] v2) Compute the distance between two vectors- Parameters:
- v1- the first vector
- v2- the second vector
- Returns:
- the euclidean distance between two vectors
 
- 
locDiffCompute 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
 
- 
printSummarypublic static void printSummary(String message, int nstep, double momentum, double[] y, double[] hdata) 
- 
printSummarypublic static void printSummary(String message, int nstep, double momentum, double theta0, SwimZStateVector sv, double[] hdata) 
- 
Xmainmain program- Parameters:
- arg- command line arguments (ignored)
 
- 
mainmain program- Parameters:
- arg- command line arguments (ignored)
 
 
-