Package com.polytechnik.kgo
Class KGOEVSelection
java.lang.Object
com.polytechnik.kgo.KGOEVSelection
- Direct Known Subclasses:
KGOIterationalLinearConstraints.KGOEVSelectionSeparatelyLast
,KGOIterationalLinearConstraintsE.KGOEVSelectionSeparatelyLast
,KGOIterationalLinearConstraintsExtraDegreesOfFreedom.KGOEVSelectionSeparatelyExtraElements
A container to store a vector corresponding to a KGO operator.
It has several methods to "adjust" stored arbitrary solution
to become partially unitary KGO operator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double
The eigenvalue of this state.private static final EVSolver
final double[]
Original eigenvector, an operator is extracted from it row by row.final int
Index of original eigenvector, \(ind \in [0\dots nC*nX-1] \).final int
The dimensions,eVector.length=nX*nC
.final int
The dimensions,eVector.length=nX*nC
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdjust theeVector
to be partially unitary.private AdjustedStateToUnitaryWithSVD
getSVDAdjustedPartially
(double adjustmentLevel) Adjust singular values partially.Adjust all singular values to 1.(package private) AdjustedStateToUnitaryWithSVD
getSVDAdjustedToPlusMinus1
(double[] SK) Adjust all singular values to +-1, find the best combination of signs.Do not adjust singular values.(package private) static List
<KGOEVSelection> selectTopEV
(int ntop, double[] ev, int nC, int nX)
-
Field Details
-
ind
public final int indIndex of original eigenvector, \(ind \in [0\dots nC*nX-1] \). -
eVector
public final double[] eVectorOriginal eigenvector, an operator is extracted from it row by row. -
eLambda
public final double eLambdaThe eigenvalue of this state. -
nC
public final int nCThe dimensions,eVector.length=nX*nC
. -
nX
public final int nXThe dimensions,eVector.length=nX*nC
. -
EV
-
-
Constructor Details
-
KGOEVSelection
KGOEVSelection(int ind, double[] eVector, double eLambda, int nC, int nX)
-
-
Method Details
-
getEVAdjustedTo1
Adjust theeVector
to be partially unitary. The result should be the same (within sign) as the one fromgetSVDAdjustedTo1()
. This method is faster and returns the data with additional constraint-related info that is useful in iteration process.- See Also:
-
getSVDAdjustedTo1
Adjust all singular values to 1. The result should be the same as the one fromgetEVAdjustedTo1()
. This method is typically used for only for unit tests.- See Also:
-
selectTopEV
-
getSVDAdjustedPartially
Adjust singular values partially.- Parameters:
adjustmentLevel
- A value between [0:1], 0 -- do not adjust, 1 -- adjust all to 1, for other values they are set to Sigma*(1-adjustmentLevel)+1*(adjustmentLevel), then normalized to nC=sum Sigma^2.- Returns:
- Adjusted SVD.
-
getSVDAdjustedToPlusMinus1
Adjust all singular values to +-1, find the best combination of signs. For not very bad initial state the best result corresponds to all signs 1 (the same is with all -1), as this is a minimal adjustment of all positive singular values returned by a SVD solver. There are \( 2^{nC} \) check of +-1 combinations what may be really slow. -
getSVDNonAdjusted
Do not adjust singular values.
-