Package samer.maths.opt
Class Constraints
- java.lang.Object
-
- samer.maths.opt.Constraints
-
- Direct Known Subclasses:
- Positivity, ZeroCrossingSparsity
public abstract class Constraints extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
Constraints.Factory
-
Field Summary
Fields Modifier and Type Field and Description int[]
active
int[]
inactive
int
m
int
n
State
S
-
Constructor Summary
Constructors Constructor and Description Constraints(State s)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description void
activate(int i)
activate the i'th dimension Presupposes that it is not already inactivevoid
activateAll()
int
activeCount()
void
deactivateAll()
double
dot(double[] a, double[] b)
sparse vector dot productvoid
eval2()
evaluate function and gradient at P2int
getReleasableDimensions()
int
getReleasedDimension()
void
inactivate(int i)
Inactivate the i'th dimension Presupposes that it is not already inactiveabstract void
initialise()
abstract void
lineSearch(Condition c, CubicLineSearch ls, double step)
double
maxabs(double[] x)
sparse max(abs(x))void
mul(double[] a, double b)
sparse vector time scalarvoid
mul(double[] y, double[][] A, double[] x)
sparse matrix mutiplicationvoid
negate(double[] x)
sparse vector negation in placevoid
negate(double[] x, double[] y)
sparse vector negation in placeboolean
release(Datum P)
void
report()
void
step(double lambda)
take a step of lambda*h, set alpha, but don't evaluate function at new pointvoid
sub(double[] a, double[] b)
sparse vector subtraction in placevoid
sub(double[] out, double[] a, double[] b)
sparse vector subtractionvoid
zeroInactive(double[] z)
-
-
-
Field Detail
-
active
public int[] active
-
inactive
public int[] inactive
-
m
public int m
-
n
public int n
-
S
public State S
-
-
Constructor Detail
-
Constraints
public Constraints(State s)
-
-
Method Detail
-
activeCount
public final int activeCount()
-
report
public void report()
-
activateAll
public void activateAll()
-
deactivateAll
public void deactivateAll()
-
zeroInactive
public void zeroInactive(double[] z)
-
inactivate
public final void inactivate(int i)
Inactivate the i'th dimension Presupposes that it is not already inactive
-
activate
public final void activate(int i)
activate the i'th dimension Presupposes that it is not already inactive
-
step
public void step(double lambda)
take a step of lambda*h, set alpha, but don't evaluate function at new point
-
eval2
public void eval2()
evaluate function and gradient at P2
-
mul
public final void mul(double[] y, double[][] A, double[] x)
sparse matrix mutiplication
-
dot
public final double dot(double[] a, double[] b)
sparse vector dot product
-
mul
public final void mul(double[] a, double b)
sparse vector time scalar
-
sub
public final void sub(double[] out, double[] a, double[] b)
sparse vector subtraction
-
sub
public final void sub(double[] a, double[] b)
sparse vector subtraction in place
-
negate
public final void negate(double[] x)
sparse vector negation in place
-
negate
public final void negate(double[] x, double[] y)
sparse vector negation in place
-
maxabs
public final double maxabs(double[] x)
sparse max(abs(x))
-
release
public boolean release(Datum P)
-
getReleasedDimension
public int getReleasedDimension()
-
getReleasableDimensions
public int getReleasableDimensions()
-
lineSearch
public abstract void lineSearch(Condition c, CubicLineSearch ls, double step)
-
initialise
public abstract void initialise()
-
-