Coverage Report - net.sourceforge.combean.mathprog.lp.model.AbstractSimpleIndexLPConstrainedRowsWithVars
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractSimpleIndexLPConstrainedRowsWithVars
82%
9/11
N/A
1
 
 1  
 /*
 2  
  * Created on 12.08.2006
 3  
  *
 4  
  */
 5  
 package net.sourceforge.combean.mathprog.lp.model;
 6  
 
 7  
 import net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence;
 8  
 import net.sourceforge.combean.interfaces.mathprog.lp.model.LPModelComponent;
 9  
 import net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence;
 10  
 
 11  
 /**
 12  
  * Abstract base class for LP models with a single pair of offset ids
 13  
  * and come together with their constraints and variables.
 14  
  * 
 15  
  * @author schickin
 16  
  *
 17  
  */
 18  
 public abstract class AbstractSimpleIndexLPConstrainedRowsWithVars
 19  
 extends AbstractSimpleIndexLPConstrainedRows
 20  
 implements LPVariableSequence, LPConstraintSequence, LPModelComponent {
 21  
 
 22  6
     private int varOffset = LPVariableSequence.OFFSET_UNDEFINED;
 23  
 
 24  
     /**
 25  
      * @param rowOffsetId
 26  
      * @param columnOffsetId
 27  
      */
 28  
     public AbstractSimpleIndexLPConstrainedRowsWithVars(String rowOffsetId,
 29  
             String columnOffsetId) {
 30  6
         super(rowOffsetId, columnOffsetId);
 31  6
     }
 32  
 
 33  
     /* (non-Javadoc)
 34  
      * @see net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence#setVarOffsetId(java.lang.String)
 35  
      */
 36  
     public void setVarOffsetId(String columnOffsetId) {
 37  0
         setColumnOffsetId(columnOffsetId);
 38  0
     }
 39  
 
 40  
     /* (non-Javadoc)
 41  
      * @see net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence#getVarOffsetId()
 42  
      */
 43  
     public String getVarOffsetId() {
 44  6
         return getColumnOffsetId();
 45  
     }
 46  
 
 47  
     /* (non-Javadoc)
 48  
      * @see net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence#setVarOffset(int)
 49  
      */
 50  
     public void setVarOffset(int globalIndex) {
 51  6
         this.varOffset = globalIndex;
 52  6
     }
 53  
 
 54  
     /* (non-Javadoc)
 55  
      * @see net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence#getVarOffset()
 56  
      */
 57  
     public int getVarOffset() {
 58  276
         return this.varOffset;
 59  
     }
 60  
 
 61  
     /* (non-Javadoc)
 62  
      * @see net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence#getNumVars()
 63  
      */
 64  
     public int getNumVars() {
 65  228
          return getNumColumns();
 66  
     }
 67  
 
 68  
     /* (non-Javadoc)
 69  
      * @see net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence#isInteger()
 70  
      */
 71  
     public boolean isInteger() {
 72  6
          return false;
 73  
     }
 74  
 
 75  
 }