treecalc.comp
Class ModelSimple
java.lang.Object
treecalc.comp.ModelSimple
public class ModelSimple
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
builtin
public java.lang.String[] builtin
globalScope
public Scope globalScope
maintreeScope
public ScopeNode maintreeScope
combinedScope
public Scope combinedScope
trees
public java.util.ArrayList<ModelTree> trees
ModelSimple
public ModelSimple(TcAst root)
addTable
public void addTable(GenTable table)
getTable
public GenTable getTable(java.lang.String tablename)
getTable
public GenTable getTable(int tableindex)
getTableSize
public int getTableSize()
addFunction
public void addFunction(GenFunction function)
getFunction
public GenFunction getFunction(java.lang.String name)
getFunction
public GenFunction getFunction(int index)
getFunctionSize
public int getFunctionSize()
addInput
public void addInput(GenInput input)
getInput
public GenInput getInput(java.lang.String name)
getInput
public GenInput getInput(int index)
getInputSize
public int getInputSize()
getNodeDataSize
public int getNodeDataSize()
getNodeData
public ModelSimple.NodeData getNodeData(ScopeNode scopeNode)
getNodeData
public ModelSimple.NodeData getNodeData(int nodeindex)
addNodeData
public void addNodeData(ScopeNode scopeNode,
ModelSimple.NodeData nodeData)
getCalcnamesSize
public int getCalcnamesSize()
- Map of all all result-definition names within the nodes reachable from the main root node.
name: property name (TODO: add arity to key)
value: unique integer to be used as index into the bitset
addCalcname
public void addCalcname(java.lang.String calcname,
int nargs,
int calcindex)
getCalcname
public GenNodeCalc getCalcname(int calcindex)
getCalcindex
public int getCalcindex(java.lang.String calcname,
int nargs)
getCommonParent
public int getCommonParent(int[] nodes)
- Returns:
- closest common parent, -1 if nodes argument is empty
setAstRoot
public void setAstRoot(TcAst root)
getRoot
public TcAst getRoot()
putTimesName
public void putTimesName(java.lang.String name)
getTimesId
public int getTimesId(java.lang.String name)
getTimesName
public java.lang.String getTimesName(int id)
getTimesSize
public int getTimesSize()
getInputAutocounters
public int[] getInputAutocounters(GenInput input)
- Parameters:
inputname
-
- Returns:
- array of timesindex for the given input
putConstant
public void putConstant(FormulaConstant constant)
getConstants
public java.util.HashMap<java.lang.String,FormulaConstant> getConstants()
getInputcalcSize
public int getInputcalcSize()
putInputcalc
public void putInputcalc(java.lang.String inputcalcName)
getInputcalcIndex
public int getInputcalcIndex(java.lang.String inputcalcName)
getInputcalcName
public java.lang.String getInputcalcName(int index)
getCacheId
public int getCacheId(java.lang.String description)
getCacheIds
public java.util.HashMap<java.lang.Integer,java.lang.String> getCacheIds()
putFormula
public int putFormula(TcAst formula)
getFormulaSize
public int getFormulaSize()
getFormula
public TcAst getFormula(int id)
Copyright © 2013. All Rights Reserved.