codesimian
Class BigOException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
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
Constructor Summary |
BigOException(java.lang.String equationCode)
|
BigOException(java.lang.String equationCode,
java.lang.String message)
|
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 |
equationCode
protected java.lang.String equationCode
equationInstance
protected java.lang.Object equationInstance
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
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) )