codesimian
Class BigOException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by codesimian.BigOException
All Implemented Interfaces:
java.io.Serializable

public class BigOException
extends java.lang.RuntimeException

My constructors throw a BigOException if their parameter (a String of codesimian code) is too long or complicated.

See Also:
Serialized Form

Field Summary
protected  java.lang.String equationCode
           
protected  java.lang.Object equationInstance
           
 
Constructor Summary
BigOException(java.lang.String equationCode)
           
BigOException(java.lang.String equationCode, java.lang.String message)
           
 
Method Summary
 double getBigOGuessUsingCurrentVarValues()
           
 java.lang.String getEquationCode()
          Every BIG-O problem has an equation that tells how much time the program needs to run.
 int getVariableCount()
          Returns the number of variables in the BIG-O equation, which is 1 less than the compiled code's child quantity.
 void setVarValue(int index, double value)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

equationCode

protected java.lang.String equationCode

equationInstance

protected java.lang.Object equationInstance
Constructor Detail

BigOException

public BigOException(java.lang.String equationCode)
              throws BigOException
Throws:
BigOException

BigOException

public BigOException(java.lang.String equationCode,
                     java.lang.String message)
              throws BigOException
Throws:
BigOException
Method Detail

getVariableCount

public int getVariableCount()
Returns the number of variables in the BIG-O equation, which is 1 less than the compiled code's child quantity.


setVarValue

public void setVarValue(int index,
                        double value)

getBigOGuessUsingCurrentVarValues

public double getBigOGuessUsingCurrentVarValues()

getEquationCode

public java.lang.String getEquationCode()
Every BIG-O problem has an equation that tells how much time the program needs to run.

getEquationCode() returns Codesimian code for an object whose first countP()-1 indexs are the variables in the BIG-O equation. The last index is ignored because it has to store the equation somewhere.

Example: do( 5000#nodeCount 300#edgesPerNode *(nodeCount edgesPerNode) )