Nengo.ca

ca.nengo.math.impl
Class GradientDescentApproximator.CoefficientsSameSign

java.lang.Object
  extended by ca.nengo.math.impl.GradientDescentApproximator.CoefficientsSameSign
All Implemented Interfaces:
GradientDescentApproximator.Constraints, java.io.Serializable, java.lang.Cloneable
Enclosing class:
GradientDescentApproximator

public static class GradientDescentApproximator.CoefficientsSameSign
extends java.lang.Object
implements GradientDescentApproximator.Constraints

Forces all decoding coefficients to be >= 0.

See Also:
Serialized Form

Constructor Summary
GradientDescentApproximator.CoefficientsSameSign(boolean positive)
           
 
Method Summary
 GradientDescentApproximator.Constraints clone()
           
 boolean correct(float[] coefficients)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientDescentApproximator.CoefficientsSameSign

public GradientDescentApproximator.CoefficientsSameSign(boolean positive)
Parameters:
positive - Sign to force all coefficients to
Method Detail

correct

public boolean correct(float[] coefficients)
Specified by:
correct in interface GradientDescentApproximator.Constraints
Parameters:
coefficients - A set of coefficients which may violate constraints (they are altered as little as possible by this method so that they satisfy constraints after the call)
Returns:
True if all coefficients had to be corrected (no further improvement is possible in the attempted direction)
See Also:
GradientDescentApproximator.Constraints.correct(float[])

clone

public GradientDescentApproximator.Constraints clone()
                                              throws java.lang.CloneNotSupportedException
Specified by:
clone in interface GradientDescentApproximator.Constraints
Overrides:
clone in class java.lang.Object
Returns:
Valid clone
Throws:
java.lang.CloneNotSupportedException - if clone can't be made

Nengo.ca