scpsolver.constraints
Interface LinearConstraint

All Superinterfaces:
Constraint
All Known Implementing Classes:
LinearBiggerThanEqualsConstraint, LinearEqualsConstraint, LinearSmallerThanEqualsConstraint

public interface LinearConstraint
extends Constraint

Constraint format of a linear program.

Author:
schober

Method Summary
 void addToLinearProgramSolver(LinearProgramSolver solver)
          Adds one line representing this constraint to the constraint matrix of a given solver.
 double[] getC()
          Returns the weight vector of this constraint.
 SparseVector getCSparse()
          Returns a sparse representation of the weight vector.
 double getT()
          Returns the target value of this constraint.
 
Methods inherited from interface scpsolver.constraints.Constraint
getName, getRHS, isSatisfiedBy
 

Method Detail

addToLinearProgramSolver

void addToLinearProgramSolver(LinearProgramSolver solver)
Adds one line representing this constraint to the constraint matrix of a given solver.

Parameters:
solver - an instance of a linear program solver

getC

double[] getC()
Returns the weight vector of this constraint.

For easier constraint manipulation, SCPSolver saves not one big constraint matrix as the formal description of a linear problem suggests, but creates a line for line representation of this matrix. Therefore, a formal description of this vector is the i-th line of A, if this constraint is the i-th constraint.

Returns:
the weight vector of this constraint

getT

double getT()
Returns the target value of this constraint.

Returns:
the target value of this constraint

getCSparse

SparseVector getCSparse()
Returns a sparse representation of the weight vector.

Returns:
a sparse representation of the weight vector
See Also:
getC