Class LatticeOptimizer
java.lang.Object
_global.tri.oxidationstates.structure.LatticeOptimizer
- All Implemented Interfaces:
matsci.engine.IContinuousFunctionState
This class is used to find an "average" lattice given a set of target
lattices. The average lattice is found by minimizing the mean squared skew
factor between the target lattices and the other lattices, where the skew
factor is defined in the GeneralStructureMapper. The parameters are the
coordinate of the lattice vectors.
-
Constructor Summary
ConstructorsConstructorDescriptionLatticeOptimizer(matsci.structure.BravaisLattice initialLattice, matsci.structure.BravaisLattice[] targetLattices) Initialize the lattice optimizer for a search starting from the initialLattice. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]getGradient(double[] template) matsci.structure.BravaisLatticeReturns the optimized latticedouble[]getUnboundedParameters(double[] template) doublegetValue()intmatsci.engine.IContinuousFunctionStatesetUnboundedParameters(double[] parameters)
-
Constructor Details
-
LatticeOptimizer
public LatticeOptimizer(matsci.structure.BravaisLattice initialLattice, matsci.structure.BravaisLattice[] targetLattices) Initialize the lattice optimizer for a search starting from the initialLattice. The optimizer will try to find the lattice closest to the target lattices.- Parameters:
initialLattice- The lattice from which we should start the search.targetLattices- We are trying to find the lattice that is the best representation of these lattices.
-
-
Method Details
-
numParameters
public int numParameters()- Specified by:
numParametersin interfacematsci.engine.IContinuousFunctionState
-
getUnboundedParameters
public double[] getUnboundedParameters(double[] template) - Specified by:
getUnboundedParametersin interfacematsci.engine.IContinuousFunctionState
-
getGradient
public double[] getGradient(double[] template) - Specified by:
getGradientin interfacematsci.engine.IContinuousFunctionState
-
setUnboundedParameters
public matsci.engine.IContinuousFunctionState setUnboundedParameters(double[] parameters) - Specified by:
setUnboundedParametersin interfacematsci.engine.IContinuousFunctionState
-
getValue
public double getValue()- Specified by:
getValuein interfacematsci.engine.IContinuousFunctionState
-
getLattice
public matsci.structure.BravaisLattice getLattice()Returns the optimized lattice- Returns:
- the optimized lattice
-