Package samer.maths.opt
Class Positivity
- java.lang.Object
-
- samer.maths.opt.Constraints
-
- samer.maths.opt.Positivity
-
public class Positivity extends Constraints
Cubic line search with positivity constraints dimensions become inactive when they go to zero and the gradient > GEPS
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class samer.maths.opt.Constraints
Constraints.Factory
-
-
Constructor Summary
Constructors Constructor and Description Positivity(MinimiserBase minimiser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanclipStep(double beta)Take a step but make sure none of the coordinates becomes negative.intgetReleasedDimension()voidinitialise()constrain all dimensions which are currently set to zero.voidlineSearch(Condition convergence, CubicLineSearch ls, double beta0)booleanrelease(Datum P)This finds the constrained dimension with the largest positive gradient, and if of that gradient is bigger than 1, then releases that dimension so that it can take part in the optimization-
Methods inherited from class samer.maths.opt.Constraints
activate, activateAll, activeCount, deactivateAll, dot, eval2, getReleasableDimensions, inactivate, maxabs, mul, mul, negate, negate, report, step, sub, sub, zeroInactive
-
-
-
-
Constructor Detail
-
Positivity
public Positivity(MinimiserBase minimiser)
-
-
Method Detail
-
initialise
public void initialise()
constrain all dimensions which are currently set to zero.- Specified by:
initialisein classConstraints
-
release
public boolean release(Datum P)
This finds the constrained dimension with the largest positive gradient, and if of that gradient is bigger than 1, then releases that dimension so that it can take part in the optimization- Overrides:
releasein classConstraints
-
getReleasedDimension
public int getReleasedDimension()
- Overrides:
getReleasedDimensionin classConstraints
-
clipStep
public boolean clipStep(double beta)
Take a step but make sure none of the coordinates becomes negative. This function returns true if any dimensions were inactivated - implying that we should finish the line search. The alternative is that even the clipped step was too long and we need to interpolate some more.
-
lineSearch
public void lineSearch(Condition convergence, CubicLineSearch ls, double beta0)
- Specified by:
lineSearchin classConstraints
-
-