tpp
Class ZeroConstraint

java.lang.Object
  extended by tpp.ZeroConstraint
All Implemented Interfaces:
ProjectionConstraint

public class ZeroConstraint
extends java.lang.Object
implements ProjectionConstraint

Clamp the weights of the specified attributes to zero


Constructor Summary
ZeroConstraint(int[] attributes)
          Specify which attributes to clamp at zero
 
Method Summary
 Projection findNearestValid(Projection p)
          Find the nearest projection to that given that meets the constraint
 boolean isValid(Projection p)
          Whether or not the given projection meets the constraint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZeroConstraint

public ZeroConstraint(int[] attributes)
Specify which attributes to clamp at zero

Method Detail

findNearestValid

public Projection findNearestValid(Projection p)
Description copied from interface: ProjectionConstraint
Find the nearest projection to that given that meets the constraint

Specified by:
findNearestValid in interface ProjectionConstraint

isValid

public boolean isValid(Projection p)
Description copied from interface: ProjectionConstraint
Whether or not the given projection meets the constraint

Specified by:
isValid in interface ProjectionConstraint