Class TestKGO
java.lang.Object
com.polytechnik.kgo.TestKGO
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final double
(package private) static double
No "final", a kludgy way to make a test from other classes.(package private) final Random
(package private) final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static List
<RegularizedVectorXVectorF> (package private) static double[]
getContributingSubspaceEV
(double[] XF_KFF_FX, int nF, int nX, double eps) (package private) double[]
getSKtensor
(int nf, int nx) Creates a deterministic random SK tensor for unit tests.static void
(package private) static void
matchDirectProjection
(KGOSolutionVectorXVectorF kgo, DataReadObservationVectorXVectorF ro, double eps) (package private) void
matchKGOValues
(KGOSolutionVectorXVectorF kgo, DataReadObservationVectorXVectorF ro, KGOSolutionVectorXVectorF dkgo, DataReadObservationVectorXVectorF dro, boolean fStartsTheSame) (package private) void
matchTwoKGO
(KGOSolutionVectorXVectorF kgo, DataReadObservationVectorXVectorF ro, KGOSolutionVectorXVectorF dkgo, DataReadObservationVectorXVectorF dro, boolean fStartsTheSame) (package private) static double[]
orthogonalizeU
(int nF, int nX, double[] FX) (package private) static void
runAllTests
(Random r, double eps) (package private) void
runOne
(int nx, int nf, KGOOptimizationResult.Approximation approximation) (package private) void
runOneKGOSubspace
(int nx, int nf) (package private) void
testBases
(int nx, int nf) (package private) void
testKGOSimple
(int nx, int nf)
-
Field Details
-
r
-
size
final int size -
eps
final double eps -
EPS_selftest
static double EPS_selftestNo "final", a kludgy way to make a test from other classes. An alternative can be constructor's argument, a factory, or an injection.
-
-
Constructor Details
-
TestKGO
TestKGO(Random r, int size, double eps)
-
-
Method Details
-
getContributingSubspaceEV
static double[] getContributingSubspaceEV(double[] XF_KFF_FX, int nF, int nX, double eps) -
orthogonalizeU
static double[] orthogonalizeU(int nF, int nX, double[] FX) -
getAllRegularizations
-
testBases
void testBases(int nx, int nf) -
getSKtensor
double[] getSKtensor(int nf, int nx) Creates a deterministic random SK tensor for unit tests. -
runOne
-
runOneKGOSubspace
void runOneKGOSubspace(int nx, int nf) -
testKGOSimple
void testKGOSimple(int nx, int nf) -
matchTwoKGO
void matchTwoKGO(KGOSolutionVectorXVectorF kgo, DataReadObservationVectorXVectorF ro, KGOSolutionVectorXVectorF dkgo, DataReadObservationVectorXVectorF dro, boolean fStartsTheSame) -
matchKGOValues
void matchKGOValues(KGOSolutionVectorXVectorF kgo, DataReadObservationVectorXVectorF ro, KGOSolutionVectorXVectorF dkgo, DataReadObservationVectorXVectorF dro, boolean fStartsTheSame) -
matchDirectProjection
static void matchDirectProjection(KGOSolutionVectorXVectorF kgo, DataReadObservationVectorXVectorF ro, double eps) -
runAllTests
-
main
-