C++ main module for gpm Package
1.0
|
This class describes a pattern function. More...
#include <GPM_ModelFunction.h>
Public Member Functions | |
virtual void | copy (const GPM_Function &rule) |
copy More... | |
void | setGlobalVariables (const map< tString, SP::GPM_Variable > &variables) |
set the global variable More... | |
void | addGlobalVariables (const tString &variableName, const tFlag &type, const double &value) |
add a scalar global variable More... | |
void | addGlobalVariables (const tString &variableName, const tFlag &type, const double *values, const int &n) |
add a vector global variable More... | |
void | addGlobalVariables (const tString &variableName, const tString &value) |
add a string global variable More... | |
void | removeGlobalVariable (const tString &name) |
delete a global variable More... | |
void | clearGlobalVariables () |
clear global variables More... | |
const map< tString, SP::GPM_Variable > & | getGlobalVariables () const |
void | setGlobalFunctions (const SV::GPM_CompositorFunction &fcts) |
set the global functions More... | |
void | addGlobalFunction (const GPM_ModelClassFactory &cf, const tString &name, const vector< tString > &realParameters, const tString &body) |
add a real function More... | |
void | addGlobalFunction (const GPM_ModelClassFactory &cf, const tString &name, const vector< tString > &nameParameters, const vector< tFlag > &typeParameters, const vector< tFlag > &cardParameters, const vector< tFlag > &isConstParameters, const tString &body, const tFlag &returnType) |
add a mixed function More... | |
void | addGlobalFunction (const GPM_ModelClassFactory &cf, const tString &strFunction) |
add a real function More... | |
void | clearGlobalFunctions () |
clear global variables More... | |
const SV::GPM_CompositorFunction & | getGlobalFunctions () const |
virtual void | clear () |
clear all data for rules More... | |
void | clearRules () |
clear rules More... | |
void | addMappingRule (SP::GPM_Rule rule) |
add the mapping rule More... | |
void | removeMappingRule (const int &index) |
remove the mapping rule at index More... | |
const SV::GPM_Rule & | getMappingRules () const |
get the mapping rules for reading More... | |
SV::GPM_Rule & | getMappingRules () |
get the mapping rules for writing More... | |
tBoolean | readRulesFromFile (const tString &fileName, const GPM_ModelClassFactory &cf, CORE_Out &io) |
read the rules the rules file format is has folow #size & list of ids of vertices of pattern graph to remove 0 #size & list of ids of edges of pattern graph to remove 1 1 #size & list of edges between Pattern graph vertex id , Transform graph vertex id to add 2 1,0 2,8 #group node ids rules variable_name1+variableName2+... groupNodeIds= #group port ids rules groupPortIds= #mapping rules for pattern vertex in format variableName_id=2 tag_1={"+";...;} tag_2="-" #coordinates state update T_<node id of the transform graph>=f(P_<node id of the pattern graph>,varName_<node id of the pattern graph>)) 3 T_1=(2/3)*P_0+(1/3)*P_3 T_4=0.5*(P_0+P_3)+(sqrt(3)/6)*(-rotation(P_0,PI/2)+rotation(P_3,PI/2)) T_7=(1/3)*P_0+(2/3)*P_3 #variable rules update varName_{P,T}_<node id of the graph>=f(P_<node id of the pattern graph>,varName_<node id of the pattern graph>)) 0 More... | |
tBoolean | saveRulesToFile (const tString &fileName) const |
virtual tBoolean | isMappingValid (const GPM_PortGraph &largeGraph, const SV::GPM_Vertex &smallGraphVertices, const vector< tVertexIID > &mapping, CORE_Out &io) const |
return true if the mapping is valid More... | |
void | updateRules (const GPM_ModelClassFactory &cf) |
update the rule to new type of rule More... | |
tString | toString () const |
return the string representation of the class More... | |
void | setIsUpToAutomorphism (const tBoolean &isUpToAutomorphism) |
set is up to automorphism More... | |
void | setUpToAutomorphismType (const tFlag &upToAutomorphismType) |
tBoolean | isUpToAutomorphism () const |
return true if the function is up to automorphism More... | |
tFlag | getUpToAutomorphismType () const |
return the type of graph element to be up to automorphism More... | |
void | addPVertexToRemove (const int &vid) |
add the vertex to remove from pattern graph More... | |
void | removePVertexToRemove (const int &vid) |
remove the vertex to remove from pattern graph More... | |
void | addPVertexToKeep (const int &vid) |
add the vertex to keep from pattern graph More... | |
void | removePVertexToKeep (const int &vid) |
remove the vertex to keep from pattern graph More... | |
tBoolean | isPVertexToRemove (const int &id) const |
return true if the vertex has already a cut trigger action More... | |
tBoolean | isPVertexToKeep (const int &id) const |
return true if the vertex has already a keep trigger action More... | |
tBoolean | isPVertexMustBeKept (const int &id) const |
return true if the vertex must be kept More... | |
void | addPEdgeToRemove (const int &eid) |
add the edge to remove from pattern graph More... | |
void | addPEdgeToRemove (const int &source, const int &target) |
add the edge to remove from pattern graph More... | |
void | removePEdgeToRemove (const int &eid) |
remove the edge to remove from pattern graph More... | |
void | addPEdgeToKeep (const int &eid) |
add the edge to keep from pattern graph More... | |
void | addPEdgeToKeep (const int &source, const int &target) |
add the edge to remove from pattern graph More... | |
void | removePEdgeToKeep (const int &eid) |
remove the edge to keep from pattern graph More... | |
const map< int, tBoolean > & | getPatternEdgesToRemove () const |
get the pattern edges list to remove More... | |
void | getPatternEdgesToRemove (vector< int > &ids) const |
get the edges to remove from associated pattern graph More... | |
const map< int, tBoolean > & | getPatternEdgesToKeep () const |
get the pattern edges list to keep More... | |
void | getPatternEdgesToKeep (vector< int > &ids) const |
get the edges to keep from associated pattern graph More... | |
const map< int, tBoolean > & | getPatternVerticesToRemove () const |
get the pattern vertices list to remove More... | |
void | getPatternVerticesToRemove (vector< int > &ids) const |
get the vertices to remove from associated pattern graph More... | |
const map< int, tBoolean > & | getPatternVerticesToKeep () const |
get the pattern vertices list to keep More... | |
void | getPatternVerticesToKeep (vector< int > &ids) const |
get the vertices to keep from associated pattern graph More... | |
tBoolean | isPEdgeToRemove (const int &id) |
return true if the edge has already a cut trigger action More... | |
tBoolean | isPEdgeToKeep (const int &id) const |
return true if the edge has already a keep trigger action More... | |
void | addPTEdgeToAdd (const int &source, const int &target) |
add the edge (source,target) source in pattern graph , target in transformed graph More... | |
void | addPTEdgeToAdd (SP::GPM_Vertex source, SP::GPM_Vertex target) |
add the edge (source,target) source in pattern graph , target in transformed graph More... | |
void | addPTEdgeToAdd (SP::GPM_Edge edge) |
add the edge (source,target) source in pattern graph , target in transformed graph More... | |
int | getPTEdgesNumber () const |
get the number of edges to add More... | |
SP::GPM_Edge | getPTEdge (const int &index) const |
get the i-th edge to add More... | |
void | removeLastPTEdge () |
remove the last edge (source,target) source in pattern graph , target in transformed graph More... | |
void | removePTEdgeToAdd (SP::GPM_Edge edge) |
remove the edge (source,target) More... | |
void | removePTEdgeToAdd (const int &source, const int &target) |
remove the edge (source,target) More... | |
void | clearPTEdgesToAdd () |
void | removePTEdgeToAddWithSource (const int &sourceId) |
remove the edge for pattern &transform graph with source More... | |
void | removePTEdgeToAddWithTarget (const int &targetId) |
remove the edge for pattern &transform graph with target More... | |
void | addVariableNameToNodeGroupId (const tString &name) |
add the state to build the group id of node More... | |
void | removeVariableNameToNodeGroupId (const int &index) |
remove the state at index to build the group id of node More... | |
void | addVariableNameToPortGroupId (const tString &name) |
add the state to build the group id of port More... | |
void | removeVariableNameToPortGroupId (const int &index) |
remove the state at index to build the group id of port More... | |
void | initGroupNames (GPM_PortGraph &graph, CORE_Out &io) const |
init the group name id More... | |
const vector< tString > & | getNodeGroupIds () const |
get the variables names to define the group name of nodes More... | |
const vector< tString > & | getPortGroupIds () const |
get the variables names to define the group name of ports More... | |
const SV::GPM_Edge & | getPatternTransformEdgesToAdd () const |
get the edges to ad dfrom pattern graph to transformed graph More... | |
SV::GPM_Edge & | getPatternTransformEdgesToAdd () |
get the edges to ad dfrom pattern graph to transformed graph More... | |
tBoolean | isVertexCut (const int &id) const |
return true if the vertex is cut More... | |
tBoolean | isVertexKept (const int &id) const |
return true if the vertex is kept More... | |
tBoolean | isEdgeCut (const int &id) const |
return true if the edge is cut More... | |
tBoolean | isEdgeKept (const int &id) const |
return true if the edge is keep More... | |
tBoolean | isValid () const |
return true if the topological rules transformation will build to a valid graph More... | |
virtual tBoolean | apply (GPM_Graph &largeGraph, const vector< tVertexIID > &mappingP2L, CORE_Out &io) |
apply the trnafsormtaion with pattern More... | |
void | setPatternGraph (SP::GPM_PortGraph f) |
set the pattern graph More... | |
const GPM_PortGraph & | getPatternGraph () const |
get the pattern graph for reading More... | |
GPM_PortGraph & | getPatternGraph () |
get the pattern graph for writing More... | |
void | setTransformerGraph (SP::GPM_PortGraph f) |
set the transformer graph More... | |
const GPM_PortGraph & | getTransformerGraph () const |
get the transformer graph for reading More... | |
GPM_PortGraph & | getTransformerGraph () |
get the transformer graph for writing More... | |
void | getSharedPointer (SP::CORE_Object &p) |
get the shared pointer of this class into p More... | |
void | getSharedPointer (SPC::CORE_Object &p) const |
get the shared pointer of this class into p More... | |
tString | getClassName () const |
return the class name of the object More... | |
tString | getIdentityString () const |
return the identity string of the object of the form className_at_address More... | |
tString | getPointerAddress () const |
return the identity string of the object More... | |
template<class T > | |
tBoolean | isInstanceOf () const |
return true if the object is an instance of T More... | |
virtual void | print () |
print the class More... | |
virtual ostream & | print (ostream &out) const |
print the class More... | |
virtual void | print (const tString &message) |
print the class More... | |
virtual void | print (const tInteger &str) |
print More... | |
virtual void | print (const tRelativeInteger &str) |
print More... | |
virtual void | print (const tReal &str) |
print More... | |
virtual void | print (const int &str) |
print More... | |
Static Public Member Functions | |
static SP::GPM_ModelFunction | New () |
create a port More... | |
static void | expandVariableNames (const vector< tString > &vars, const int &id, tString &value, const tString &graphLetter, const tString &elementLetter) |
replace variable names varName -> varName+"_"+graphLetter+"_"+id graphLetter -> graphLetter+"_"+id x -> "mCoord.x_"+graphLetter+"_"+id y -> "mCoord.y_"+graphLetter+"_"+id z -> "mCoord.z_"+graphLetter+"_"+id More... | |
static tBoolean | parseVarName (tString &varName, tString &graphLetter, tString &elementLetter, int &id) |
useful function to parse varname & id More... | |
static tString | varNameToString (const tString &varName, const tString &graphLetter, const tString &elementLetter, const int &id) |
useful function to create varname from vertex More... | |
static void | turnBodyTextToLine (tString &bdy) |
static void | turnBodyLineToText (tString &bdy) |
static tString | getClassName (const tString &identityString) |
return the class name of the object using only the identity string More... | |
template<class T > | |
static tString | getTypeName () |
get type name More... | |
static tBoolean | is64Architecture () |
return true if the machine is a 64 bits machine More... | |
static tBoolean | is32Architecture () |
return true if the machine is a 32 bits machine More... | |
static tString | pointer2String (const void *obj) |
return the string represantation of a pointer More... | |
static void | setOutput (ostream &out) |
set output More... | |
static ostream & | getOutput () |
get output More... | |
static void | printObjectsInMemory () |
print object in memory More... | |
static ostream & | print (ostream &out, const tString &message) |
print the class More... | |
static void | outputPrint (const tString &message) |
Static Public Attributes | |
static tBoolean | mIsMemoryTesting =false |
indicator to store all classes created and deleted only for debuging version More... | |
Protected Member Functions | |
GPM_ModelFunction (void) | |
create an object More... | |
virtual | ~GPM_ModelFunction (void) |
destroy an object. More... | |
virtual void | toDoAfterThisSetting () |
method called after this setting More... | |
virtual tBoolean | updateTransformerGraphStates (GPM_Graph &largeGraph, const vector< tVertexIID > &mappingP2L, const map< tVertexIID, tVertexIID > &mappingT2L, CORE_Out &io) |
update the states of the transformed graph copied in the large graph More... | |
virtual tBoolean | updatePatternGraphStates (GPM_Graph &largeGraph, const vector< tVertexIID > &mappingP2L, CORE_Out &io) |
update the states of the transformed graph copied in the large graph More... | |
virtual tBoolean | updatePTEdgesStates (SP::GPM_Edge PTedge, SP::GPM_Edge ledge, GPM_Graph &largeGraph, const vector< tVertexIID > &mappingP2L, const map< tVertexIID, tVertexIID > &mappingT2L, CORE_Out &io) |
update the states of edges betwen pattern & transform graph More... | |
void | setThis (SP::CORE_Object p) |
set this weak shared pointer called toDoAfterThis setting method More... | |
virtual void | setType (tString type) |
set the type of the object More... | |
This class describes a pattern function.
|
protected |
|
protectedvirtual |
destroy an object.
void GPM_ModelFunction::addGlobalFunction | ( | const GPM_ModelClassFactory & | cf, |
const tString & | name, | ||
const vector< tString > & | realParameters, | ||
const tString & | body | ||
) |
add a real function
References GPM_ModelClassFactory::newFunction(), and null.
Referenced by readRulesFromFile().
void GPM_ModelFunction::addGlobalFunction | ( | const GPM_ModelClassFactory & | cf, |
const tString & | name, | ||
const vector< tString > & | nameParameters, | ||
const vector< tFlag > & | typeParameters, | ||
const vector< tFlag > & | cardParameters, | ||
const vector< tFlag > & | isConstParameters, | ||
const tString & | body, | ||
const tFlag & | returnType | ||
) |
add a mixed function
References GPM_ModelClassFactory::newFunction(), and null.
void GPM_ModelFunction::addGlobalFunction | ( | const GPM_ModelClassFactory & | cf, |
const tString & | strFunction | ||
) |
add a real function
References GPM_ModelClassFactory::newFunction(), and null.
|
inline |
add a scalar global variable
References GPM_Variable::setType(), and GPM_Variable::setValue().
|
inline |
add a vector global variable
References GPM_Variable::setType(), and GPM_Variable::setValue().
|
inline |
add a string global variable
References GPM_Variable::setType(), GPM_Variable::setValue(), and GPM_Variable::STRING.
|
inline |
add the mapping rule
Referenced by GPMG_RulesWindow::componentClicked().
|
inlineinherited |
add the edge to keep from pattern graph
Referenced by GPM_PatternFunction::addPEdgeToKeep(), and readRulesFromFile().
|
inlineinherited |
add the edge to remove from pattern graph
References GPM_PatternFunction::addPEdgeToKeep(), GPM_Graph::getEdge(), GPM_Function::getPatternGraph(), and null.
|
inlineinherited |
add the edge to remove from pattern graph
Referenced by GPM_PatternFunction::addPEdgeToRemove(), and readRulesFromFile().
|
inlineinherited |
add the edge to remove from pattern graph
References GPM_PatternFunction::addPEdgeToRemove(), GPM_Graph::getEdge(), GPM_Function::getPatternGraph(), and null.
|
inlineinherited |
add the edge (source,target) source in pattern graph , target in transformed graph
References GPM_Function::getPatternGraph(), GPM_Function::getTransformerGraph(), GPM_Graph::getVertex(), and GPM_Graph::getVertexIID().
Referenced by GPM_PatternFunction::addPTEdgeToAdd(), and readRulesFromFile().
|
inlineinherited |
add the edge (source,target) source in pattern graph , target in transformed graph
References GPM_PatternFunction::addPTEdgeToAdd(), GPM_Function::getPatternGraph(), and GPM_Graph::newEdge().
|
inlineinherited |
add the edge (source,target) source in pattern graph , target in transformed graph
References GPM_PatternFunction::addPVertexToKeep().
|
inlineinherited |
add the vertex to keep from pattern graph
Referenced by GPM_PatternFunction::addPTEdgeToAdd(), and readRulesFromFile().
|
inlineinherited |
add the vertex to remove from pattern graph
Referenced by readRulesFromFile().
|
inlineinherited |
add the state to build the group id of node
Referenced by GPMG_RulesWindow::componentClicked(), and readRulesFromFile().
|
inlineinherited |
add the state to build the group id of port
Referenced by GPMG_RulesWindow::componentClicked(), and readRulesFromFile().
|
inlinevirtualinherited |
apply the trnafsormtaion with pattern
largeGraph | the large graph |
mapping | the mapping from vertrices of the pattern graph to the vertices of the large graph |
Implements GPM_Function.
References GPM_Function::getPatternGraph(), and GPM_Function::getTransformerGraph().
|
virtual |
clear all data for rules
Reimplemented from GPM_PatternFunction.
References GPM_PatternFunction::clear(), and clearRules().
Referenced by GPMG_RulesWindow::componentClicked().
|
inline |
|
inline |
|
inlineinherited |
clearPT edges to add
void GPM_ModelFunction::clearRules | ( | ) |
clear rules
References GPM_ModelGraph::clearRules(), GPM_Function::getPatternGraph(), GPM_Function::getTransformerGraph(), and null.
Referenced by clear(), and readRulesFromFile().
|
virtual |
copy
Reimplemented from GPM_PatternFunction.
References clearGlobalFunctions(), clearGlobalVariables(), GPM_PatternFunction::copy(), getGlobalFunctions(), getGlobalVariables(), getMappingRules(), GPM_Rule::NewInstance(), null, setGlobalFunctions(), and setGlobalVariables().
|
static |
replace variable names varName -> varName+"_"+graphLetter+"_"+id graphLetter -> graphLetter+"_"+id x -> "mCoord.x_"+graphLetter+"_"+id y -> "mCoord.y_"+graphLetter+"_"+id z -> "mCoord.z_"+graphLetter+"_"+id
References CORE_String::isDigit(), CORE_Integer::parseInt(), tBoolean, tString, and varNameToString().
Referenced by GPMG_RulesWindow::componentClicked().
return the class name of the object using only the identity string
Referenced by CORE_Object::printObjectsInMemory().
|
inherited |
return the class name of the object
References tString.
Referenced by CORE_Object::getIdentityString().
|
inline |
|
inline |
|
inlineinherited |
return the identity string of the object of the form className_at_address
References CORE_Object::getClassName(), CORE_Object::pointer2String(), and tString.
Referenced by CORE_Object::toString().
|
inline |
get the mapping rules for reading
Referenced by copy(), and updateRules().
|
inline |
get the mapping rules for writing
|
inlineinherited |
get the variables names to define the group name of nodes
Referenced by GPMG_RulesWindow::componentClicked(), GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlinestaticinherited |
get output
|
inlineinherited |
get the pattern edges list to keep
Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlineinherited |
get the edges to keep from associated pattern graph
|
inlineinherited |
get the pattern edges list to remove
Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlineinherited |
get the edges to remove from associated pattern graph
|
inlineinherited |
get the pattern graph for reading
References null.
Referenced by GPM_PatternFunction::addPEdgeToKeep(), GPM_PatternFunction::addPEdgeToRemove(), GPM_PatternFunction::addPTEdgeToAdd(), GPM_PatternFunction::apply(), clearRules(), GPM_Function::copy(), isMappingValid(), GPM_PatternFunction::isValid(), readRulesFromFile(), GPMG_Project::saveData(), saveRulesToFile(), toString(), GPMG_Project::updateGraphsEnvironments(), updatePatternGraphStates(), updatePTEdgesStates(), updateRules(), GPM_Snow2DFunction::updateTransformerGraphStates(), and updateTransformerGraphStates().
|
inlineinherited |
get the pattern graph for writing
References null.
|
inlineinherited |
get the edges to ad dfrom pattern graph to transformed graph
Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlineinherited |
get the edges to ad dfrom pattern graph to transformed graph
|
inlineinherited |
get the pattern vertices list to keep
Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlineinherited |
get the vertices to keep from associated pattern graph
|
inlineinherited |
get the pattern vertices list to remove
Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlineinherited |
get the vertices to remove from associated pattern graph
|
inlineinherited |
return the identity string of the object
References CORE_Object::pointer2String().
|
inlineinherited |
get the variables names to define the group name of ports
Referenced by GPMG_RulesWindow::componentClicked(), GPM_PatternFunction::copy(), and saveRulesToFile().
|
inlineinherited |
get the i-th edge to add
index | index of the PT edge to add |
source | source vertex id from the pattern graph targer: target vertex id from the transfomer graph |
Referenced by readRulesFromFile(), and toString().
|
inlineinherited |
get the number of edges to add
Referenced by toString().
|
inlineinherited |
get the shared pointer of this class into p
Referenced by MATH_ParentExpression::addArgument(), GPMG_EnvironmentPanel::componentClicked(), GPM_GraphElement::copy(), CORE_Map< Key, Value >::getSharedPointer(), CORE_Array< T >::getSharedPointer(), CORE_Vector< T >::getSharedPointer(), CORE_Matrix< T >::getSharedPointer(), CORE_Object::printObjectsInMemory(), MATH_ParentExpression::setArgument(), GPMG_EnvironmentPanel::setEnvironment(), GPM_GraphElement::setGraph(), GPMG_GraphElementWindow::setGraphElement(), GPMG_ShowGraphDrawPanel::showGraph(), and GPMG_RuleGraphDrawPanel::showRule().
|
inlineinherited |
get the shared pointer of this class into p
|
inlineinherited |
get the transformer graph for reading
References null.
Referenced by GPM_PatternFunction::addPTEdgeToAdd(), GPM_PatternFunction::apply(), clearRules(), GPM_Function::copy(), GPM_PatternFunction::isValid(), readRulesFromFile(), GPMG_Project::saveData(), saveRulesToFile(), toString(), GPMG_Project::updateGraphsEnvironments(), updatePTEdgesStates(), updateRules(), GPM_Snow2DFunction::updateTransformerGraphStates(), and updateTransformerGraphStates().
|
inlineinherited |
get the transformer graph for writing
References null.
|
inlinestaticinherited |
get type name
References tString.
|
inlineinherited |
return the type of graph element to be up to automorphism
Referenced by GPM_PatternFunction::copy().
|
inherited |
init the group name id
References GPM_PortGraph::initGroupNames().
|
inlinestaticinherited |
return true if the machine is a 32 bits machine
References CORE_Object::is64Architecture().
|
staticinherited |
return true if the machine is a 64 bits machine
Referenced by CORE_Object::is32Architecture().
|
inlineinherited |
return true if the edge is cut
|
inlineinherited |
return true if the edge is keep
|
inlineinherited |
return true if the object is an instance of T
References null.
Referenced by MATH_BinaryOperator::insertInTree(), MATH_UnaryOperator::insertInTree(), and MATH_EndBlock::insertInTree().
|
virtual |
return true if the mapping is valid
Reimplemented from GPM_PatternFunction.
References CORE_Out::DEBUG_MSG, CORE_Exception::getMessage(), GPM_Function::getPatternGraph(), GPM_PatternFunction::isValid(), null, CORE_Out::println(), and tBoolean.
|
inlineinherited |
return true if the edge has already a keep trigger action
|
inlineinherited |
return true if the edge has already a cut trigger action
|
inlineinherited |
return true if the vertex must be kept
|
inlineinherited |
return true if the vertex has already a keep trigger action
|
inlineinherited |
return true if the vertex has already a cut trigger action
|
inlineinherited |
return true if the function is up to automorphism
Referenced by GPM_PatternFunction::copy(), saveRulesToFile(), and GPM_PatternFunction::setIsUpToAutomorphism().
|
inherited |
return true if the topological rules transformation will build to a valid graph
References GPM_Function::getPatternGraph(), GPM_Function::getTransformerGraph(), GPM_Graph::getVertexIID(), GPM_PortGraph::New(), null, and tBoolean.
Referenced by GPMG_Project::canBeRun(), and isMappingValid().
|
inlineinherited |
return true if the vertex is cut
|
inlineinherited |
return true if the vertex is kept
|
inlinestatic |
create a port
References GPM_ModelFunction().
Referenced by GPMG_Project::loadData().
|
staticinherited |
print on output
References null, and CORE_Object::print().
Referenced by CORE_Exception::CORE_Exception().
|
static |
useful function to parse varname & id
References CORE_Integer::parseInt().
Referenced by readRulesFromFile(), and GPMG_GraphElementWindow::updateValues().
|
staticinherited |
return the string represantation of a pointer
References tString.
Referenced by CORE_Object::CORE_Object(), CORE_Object::getIdentityString(), CORE_Object::getPointerAddress(), and CORE_Object::~CORE_Object().
|
inlinevirtualinherited |
print the class
References CORE_Object::toString().
Referenced by CORE_Object::outputPrint(), CORE_Out::print(), CORE_Object::print(), CORE_Out::printInt(), CORE_Out::println(), CORE_Out::printReal(), CORE_Out::printString(), and CORE_Out::setAction().
|
inlinevirtualinherited |
print the class
References CORE_Object::print(), and CORE_Object::toString().
|
virtualinherited |
print the class
Reimplemented in CORE_Out.
References null, and CORE_Object::print().
|
virtualinherited |
References null.
|
virtualinherited |
References null.
|
inlinestaticinherited |
print the class
|
staticinherited |
print object in memory
References CORE_Object::getClassName(), CORE_Object::getSharedPointer(), and CORE_Object::mIsMemoryTesting.
Referenced by main().
tBoolean GPM_ModelFunction::readRulesFromFile | ( | const tString & | fileName, |
const GPM_ModelClassFactory & | cf, | ||
CORE_Out & | io | ||
) |
read the rules the rules file format is has folow #size & list of ids of vertices of pattern graph to remove 0 #size & list of ids of edges of pattern graph to remove 1 1 #size & list of edges between Pattern graph vertex id , Transform graph vertex id to add 2 1,0 2,8 #group node ids rules variable_name1+variableName2+... groupNodeIds= #group port ids rules groupPortIds= #mapping rules for pattern vertex in format variableName_id=2 tag_1={"+";...;} tag_2="-" #coordinates state update T_<node id of the transform graph>=f(P_<node id of the pattern graph>,varName_<node id of the pattern graph>)) 3 T_1=(2/3)*P_0+(1/3)*P_3 T_4=0.5*(P_0+P_3)+(sqrt(3)/6)*(-rotation(P_0,PI/2)+rotation(P_3,PI/2)) T_7=(1/3)*P_0+(2/3)*P_3 #variable rules update varName_{P,T}_<node id of the graph>=f(P_<node id of the pattern graph>,varName_<node id of the pattern graph>)) 0
References addGlobalFunction(), GPM_PatternFunction::addPEdgeToKeep(), GPM_PatternFunction::addPEdgeToRemove(), GPM_PatternFunction::addPTEdgeToAdd(), GPM_PatternFunction::addPVertexToKeep(), GPM_PatternFunction::addPVertexToRemove(), GPM_PatternFunction::addVariableNameToNodeGroupId(), GPM_PatternFunction::addVariableNameToPortGroupId(), clearRules(), CORE_Out::ERROR_MSG, GPM_Graph::getEdge(), GPM_Graph::getEdgeIID(), GPM_Graph::getEdgeVertices(), GPM_Function::getPatternGraph(), GPM_PatternFunction::getPTEdge(), GPM_Function::getTransformerGraph(), GPM_Graph::getVertex(), GPM_Graph::getVertexId(), GPM_Graph::getVertexIID(), GPM_Variable::New(), CORE_String::New(), GPM_ModelGraph::newEdge(), GPM_ModelClassFactory::newRule(), null, GPM_Graph::NULL_VERTEX, GPM_ModelGraph::orderTriggerRules(), CORE_Integer::parseInt(), parseVarName(), CORE_Out::println(), GPM_PatternFunction::setIsUpToAutomorphism(), GPM_PatternFunction::setUpToAutomorphismType(), tBoolean, tFlag, CORE_Integer::toString(), tString, GPM_Object::turnBodyLineToText(), and GPM_Graph::UP_TO_AUTOMORPHISM_NODE.
void GPM_ModelFunction::removeGlobalVariable | ( | const tString & | name | ) |
delete a global variable
|
inlineinherited |
remove the last edge (source,target) source in pattern graph , target in transformed graph
References GPM_PatternFunction::removePTEdgeToAdd().
|
inline |
remove the mapping rule at index
Referenced by GPMG_RulesWindow::componentClicked().
|
inlineinherited |
remove the edge to keep from pattern graph
|
inlineinherited |
remove the edge to remove from pattern graph
|
inlineinherited |
remove the edge (source,target)
source | : id of the source node in pattern graph |
target | id of the target node in transformer graph |
Referenced by GPM_PatternFunction::removeLastPTEdge().
|
inherited |
remove the edge (source,target)
source | : id of the source node in pattern graph |
target | id of the target node in transformer graph |
References GPM_PatternFunction::removePVertexToKeep().
|
inherited |
remove the edge for pattern &transform graph with source
sourceId | : id of the source node in pattern graph |
References GPM_PatternFunction::removePVertexToKeep().
|
inherited |
remove the edge for pattern &transform graph with target
targetId | : id of the source node in pattern graph |
|
inlineinherited |
remove the vertex to keep from pattern graph
Referenced by GPM_PatternFunction::removePTEdgeToAdd(), and GPM_PatternFunction::removePTEdgeToAddWithSource().
|
inlineinherited |
remove the vertex to remove from pattern graph
|
inlineinherited |
remove the state at index to build the group id of node
Referenced by GPMG_RulesWindow::componentClicked().
|
inlineinherited |
remove the state at index to build the group id of port
Referenced by GPMG_RulesWindow::componentClicked().
brief save the rules into file
References GPM_Rule::getAction(), GPM_Graph::getEdges(), GPM_Rule::getExpression(), GPM_GraphElement::getId(), GPM_PatternFunction::getNodeGroupIds(), GPM_PatternFunction::getPatternEdgesToKeep(), GPM_PatternFunction::getPatternEdgesToRemove(), GPM_Function::getPatternGraph(), GPM_PatternFunction::getPatternTransformEdgesToAdd(), GPM_PatternFunction::getPatternVerticesToKeep(), GPM_PatternFunction::getPatternVerticesToRemove(), GPM_PatternFunction::getPortGroupIds(), GPM_ModelGraphElement::getRule(), GPM_ModelGraphElement::getRuleName(), GPM_ModelGraph::getRulesNumber(), GPM_ModelGraphElement::getRulesNumber(), GPM_Function::getTransformerGraph(), GPM_Graph::getVertices(), GPM_PatternFunction::isUpToAutomorphism(), null, tBoolean, tFlag, tString, GPM_Object::turnBodyTextToLine(), and varNameToString().
Referenced by GPMG_Project::saveData().
|
inline |
set the global functions
Referenced by copy(), and GPMG_Project::updateGraphsEnvironments().
void GPM_ModelFunction::setGlobalVariables | ( | const map< tString, SP::GPM_Variable > & | variables | ) |
set the global variable
References GPM_Variable::New().
Referenced by copy(), and GPMG_Project::updateGraphsEnvironments().
|
inlineinherited |
set is up to automorphism
References GPM_PatternFunction::isUpToAutomorphism().
Referenced by GPMG_RulesWindow::componentClicked(), and readRulesFromFile().
|
inlinestaticinherited |
set output
|
inlineinherited |
set the pattern graph
Referenced by toDoAfterThisSetting().
|
inlineprotectedinherited |
set this weak shared pointer called toDoAfterThis setting method
References CORE_Object::toDoAfterThisSetting().
|
inlineinherited |
set the transformer graph
Referenced by toDoAfterThisSetting().
|
inlineprotectedvirtualinherited |
set the type of the object
Referenced by CORE_CommandLine::CORE_CommandLine(), CORE_IO::CORE_IO(), GPM_2DSnowGraph::GPM_2DSnowGraph(), GPM_BGLTest::GPM_BGLTest(), GPM_ClassFactory::GPM_ClassFactory(), GPM_ConwayFunction::GPM_ConwayFunction(), GPM_ConwayGraph::GPM_ConwayGraph(), GPM_CoreRun::GPM_CoreRun(), GPM_CoreTest::GPM_CoreTest(), GPM_Edge::GPM_Edge(), GPM_ExamplesRun::GPM_ExamplesRun(), GPM_Function::GPM_Function(), GPM_Graph::GPM_Graph(), GPM_GraphElement::GPM_GraphElement(), GPM_ModelGraph::GPM_ModelGraph(), GPM_Node::GPM_Node(), GPM_Object::GPM_Object(), GPM_PatternFunction::GPM_PatternFunction(), GPM_Port::GPM_Port(), GPM_PortGraph::GPM_PortGraph(), GPM_Snow2DFunction::GPM_Snow2DFunction(), GPM_Snow3DFunction::GPM_Snow3DFunction(), GPM_Vertex::GPM_Vertex(), and MATH_ExpressionRun::MATH_ExpressionRun().
|
inlineinherited |
|
inlineprotectedvirtual |
method called after this setting
Reimplemented from GPM_Function.
References GPM_ModelGraph::New(), GPM_Function::setPatternGraph(), GPM_Function::setTransformerGraph(), and GPM_Function::toDoAfterThisSetting().
|
virtual |
return the string representation of the class
Reimplemented from GPM_PatternFunction.
References GPM_Rule::getAction(), GPM_Graph::getEdges(), GPM_Rule::getExpression(), GPM_GraphElement::getId(), GPM_Function::getPatternGraph(), GPM_PatternFunction::getPTEdge(), GPM_PatternFunction::getPTEdgesNumber(), GPM_ModelGraphElement::getRule(), GPM_ModelGraphElement::getRuleName(), GPM_ModelGraphElement::getRulesNumber(), GPM_Function::getTransformerGraph(), GPM_Graph::getVertices(), null, tFlag, CORE_Integer::toString(), GPM_PatternFunction::toString(), and tString.
|
inlinestaticinherited |
brief turn the body from the line to text
References CORE_String::replaceAll().
Referenced by GPMG_Project::loadFromUIClass(), and readRulesFromFile().
|
inlinestaticinherited |
brief turn the body from the text to line
References CORE_String::replaceAll().
Referenced by saveRulesToFile(), and GPMG_Project::saveToUIClass().
|
protectedvirtual |
update the states of the transformed graph copied in the large graph
Implements GPM_PatternFunction.
References GPM_Rule::compute(), CORE_Out::DEBUG_MSG, GPM_Rule::getAction(), GPM_Graph::getEdge(), GPM_Graph::getEdges(), GPM_GraphElement::getId(), CORE_Exception::getMessage(), GPM_Function::getPatternGraph(), GPM_ModelGraphElement::getRule(), GPM_ModelGraphElement::getRuleName(), GPM_ModelGraphElement::getRulesNumber(), GPM_Edge::getSource(), GPM_Edge::getTarget(), GPM_Rule::getValue(), GPM_GraphElement::getVariableType(), GPM_Graph::getVertex(), GPM_Graph::getVertexIID(), GPM_Graph::getVertices(), GPM_Rule::NewInstance(), null, CORE_Integer::parseInt(), CORE_Out::println(), GPM_GraphElement::setTriggerAction(), tBoolean, tFlag, CORE_Real::toString(), CORE_Integer::toString(), GPM_Rule::toString(), and tString.
|
protectedvirtual |
update the states of edges betwen pattern & transform graph
Implements GPM_PatternFunction.
References GPM_Rule::compute(), CORE_Out::DEBUG_MSG, CORE_Exception::getMessage(), GPM_Function::getPatternGraph(), GPM_ModelGraphElement::getRule(), GPM_ModelGraphElement::getRuleName(), GPM_ModelGraphElement::getRulesNumber(), GPM_Edge::getSource(), GPM_Edge::getTarget(), GPM_Function::getTransformerGraph(), GPM_Rule::getValue(), GPM_Rule::NewInstance(), null, CORE_Out::println(), tBoolean, tFlag, CORE_Integer::toString(), GPM_Rule::toString(), and tString.
void GPM_ModelFunction::updateRules | ( | const GPM_ModelClassFactory & | cf | ) |
update the rule to new type of rule
References getMappingRules(), GPM_Function::getPatternGraph(), GPM_Function::getTransformerGraph(), GPM_ModelClassFactory::newRule(), null, and GPM_ModelGraph::updateRules().
|
protectedvirtual |
update the states of the transformed graph copied in the large graph
Implements GPM_PatternFunction.
References GPM_Rule::compute(), CORE_Out::DEBUG_MSG, GPM_Graph::getEdge(), GPM_Graph::getEdges(), GPM_GraphElement::getId(), CORE_Exception::getMessage(), GPM_Function::getPatternGraph(), GPM_ModelGraphElement::getRule(), GPM_ModelGraphElement::getRuleName(), GPM_ModelGraphElement::getRulesNumber(), GPM_Edge::getSource(), GPM_Edge::getTarget(), GPM_Function::getTransformerGraph(), GPM_Rule::getValue(), GPM_GraphElement::getVariableType(), GPM_Graph::getVertex(), GPM_Graph::getVertexIID(), GPM_Graph::getVertices(), GPM_Rule::NewInstance(), null, CORE_Integer::parseInt(), CORE_Out::println(), GPM_Vertex::setCoordinates(), GPM_GraphElement::setVariableValue(), tBoolean, tFlag, CORE_Integer::toString(), GPM_Rule::toString(), and tString.
|
static |
useful function to create varname from vertex
References CORE_Integer::toString(), and tString.
Referenced by expandVariableNames(), saveRulesToFile(), and GPMG_GraphElementWindow::updateValues().
|
staticinherited |
indicator to store all classes created and deleted only for debuging version
Referenced by CORE_Object::CORE_Object(), main(), CORE_Object::printObjectsInMemory(), and CORE_Object::~CORE_Object().