C++ main module for gpm Package  1.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
GPM_ModelFunction Class Reference

This class describes a pattern function. More...

#include <GPM_ModelFunction.h>

Inheritance diagram for GPM_ModelFunction:
Inheritance graph
[legend]
Collaboration diagram for GPM_ModelFunction:
Collaboration graph
[legend]

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_PortGraphgetPatternGraph () const
 get the pattern graph for reading More...
 
GPM_PortGraphgetPatternGraph ()
 get the pattern graph for writing More...
 
void setTransformerGraph (SP::GPM_PortGraph f)
 set the transformer graph More...
 
const GPM_PortGraphgetTransformerGraph () const
 get the transformer graph for reading More...
 
GPM_PortGraphgetTransformerGraph ()
 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...
 

Detailed Description

This class describes a pattern function.

Author
Stéphane Despréaux
Version
1.0

Constructor & Destructor Documentation

GPM_ModelFunction::GPM_ModelFunction ( void  )
protected

create an object

Referenced by New().

Here is the caller graph for this function:

GPM_ModelFunction::~GPM_ModelFunction ( void  )
protectedvirtual

destroy an object.

Member Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

void GPM_ModelFunction::addGlobalFunction ( const GPM_ModelClassFactory cf,
const tString strFunction 
)

add a real function

References GPM_ModelClassFactory::newFunction(), and null.

Here is the call graph for this function:

void GPM_ModelFunction::addGlobalVariables ( const tString variableName,
const tFlag type,
const double &  value 
)
inline

add a scalar global variable

References GPM_Variable::setType(), and GPM_Variable::setValue().

Here is the call graph for this function:

void GPM_ModelFunction::addGlobalVariables ( const tString variableName,
const tFlag type,
const double *  values,
const int &  n 
)
inline

add a vector global variable

References GPM_Variable::setType(), and GPM_Variable::setValue().

Here is the call graph for this function:

void GPM_ModelFunction::addGlobalVariables ( const tString variableName,
const tString value 
)
inline

add a string global variable

References GPM_Variable::setType(), GPM_Variable::setValue(), and GPM_Variable::STRING.

Here is the call graph for this function:

void GPM_ModelFunction::addMappingRule ( SP::GPM_Rule  rule)
inline

add the mapping rule

Referenced by GPMG_RulesWindow::componentClicked().

Here is the caller graph for this function:

void GPM_PatternFunction::addPEdgeToKeep ( const int &  eid)
inlineinherited

add the edge to keep from pattern graph

Referenced by GPM_PatternFunction::addPEdgeToKeep(), and readRulesFromFile().

Here is the caller graph for this function:

void GPM_PatternFunction::addPEdgeToKeep ( const int &  source,
const int &  target 
)
inlineinherited

add the edge to remove from pattern graph

References GPM_PatternFunction::addPEdgeToKeep(), GPM_Graph::getEdge(), GPM_Function::getPatternGraph(), and null.

Here is the call graph for this function:

void GPM_PatternFunction::addPEdgeToRemove ( const int &  eid)
inlineinherited

add the edge to remove from pattern graph

Referenced by GPM_PatternFunction::addPEdgeToRemove(), and readRulesFromFile().

Here is the caller graph for this function:

void GPM_PatternFunction::addPEdgeToRemove ( const int &  source,
const int &  target 
)
inlineinherited

add the edge to remove from pattern graph

References GPM_PatternFunction::addPEdgeToRemove(), GPM_Graph::getEdge(), GPM_Function::getPatternGraph(), and null.

Here is the call graph for this function:

void GPM_PatternFunction::addPTEdgeToAdd ( const int &  source,
const int &  target 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void GPM_PatternFunction::addPTEdgeToAdd ( SP::GPM_Vertex  source,
SP::GPM_Vertex  target 
)
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().

Here is the call graph for this function:

void GPM_PatternFunction::addPTEdgeToAdd ( SP::GPM_Edge  edge)
inlineinherited

add the edge (source,target) source in pattern graph , target in transformed graph

References GPM_PatternFunction::addPVertexToKeep().

Here is the call graph for this function:

void GPM_PatternFunction::addPVertexToKeep ( const int &  vid)
inlineinherited

add the vertex to keep from pattern graph

Referenced by GPM_PatternFunction::addPTEdgeToAdd(), and readRulesFromFile().

Here is the caller graph for this function:

void GPM_PatternFunction::addPVertexToRemove ( const int &  vid)
inlineinherited

add the vertex to remove from pattern graph

Referenced by readRulesFromFile().

Here is the caller graph for this function:

void GPM_PatternFunction::addVariableNameToNodeGroupId ( const tString name)
inlineinherited

add the state to build the group id of node

Referenced by GPMG_RulesWindow::componentClicked(), and readRulesFromFile().

Here is the caller graph for this function:

void GPM_PatternFunction::addVariableNameToPortGroupId ( const tString name)
inlineinherited

add the state to build the group id of port

Referenced by GPMG_RulesWindow::componentClicked(), and readRulesFromFile().

Here is the caller graph for this function:

virtual tBoolean GPM_PatternFunction::apply ( GPM_Graph largeGraph,
const vector< tVertexIID > &  mappingP2L,
CORE_Out io 
)
inlinevirtualinherited

apply the trnafsormtaion with pattern

Parameters
largeGraphthe large graph
mappingthe 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().

Here is the call graph for this function:

void GPM_ModelFunction::clear ( )
virtual

clear all data for rules

Reimplemented from GPM_PatternFunction.

References GPM_PatternFunction::clear(), and clearRules().

Referenced by GPMG_RulesWindow::componentClicked().

Here is the call graph for this function:

Here is the caller graph for this function:

void GPM_ModelFunction::clearGlobalFunctions ( )
inline

clear global variables

Referenced by copy().

Here is the caller graph for this function:

void GPM_ModelFunction::clearGlobalVariables ( )
inline

clear global variables

Referenced by copy().

Here is the caller graph for this function:

void GPM_PatternFunction::clearPTEdgesToAdd ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void GPM_ModelFunction::copy ( const GPM_Function rule)
virtual
void GPM_ModelFunction::expandVariableNames ( const vector< tString > &  vars,
const int &  id,
tString value,
const tString graphLetter,
const tString elementLetter 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

static tString CORE_Object::getClassName ( const tString identityString)
inlinestaticinherited

return the class name of the object using only the identity string

Referenced by CORE_Object::printObjectsInMemory().

Here is the caller graph for this function:

tString CORE_Object::getClassName ( ) const
inherited

return the class name of the object

Returns
the class name of the object

References tString.

Referenced by CORE_Object::getIdentityString().

Here is the caller graph for this function:

const SV::GPM_CompositorFunction& GPM_ModelFunction::getGlobalFunctions ( ) const
inline

get the global variable

Referenced by copy().

Here is the caller graph for this function:

const map<tString,SP::GPM_Variable>& GPM_ModelFunction::getGlobalVariables ( ) const
inline

get the global variable

Referenced by copy().

Here is the caller graph for this function:

tString CORE_Object::getIdentityString ( ) const
inlineinherited

return the identity string of the object of the form className_at_address

Returns
the identity string of the object

References CORE_Object::getClassName(), CORE_Object::pointer2String(), and tString.

Referenced by CORE_Object::toString().

Here is the call graph for this function:

Here is the caller graph for this function:

const SV::GPM_Rule& GPM_ModelFunction::getMappingRules ( ) const
inline

get the mapping rules for reading

Referenced by copy(), and updateRules().

Here is the caller graph for this function:

SV::GPM_Rule& GPM_ModelFunction::getMappingRules ( )
inline

get the mapping rules for writing

const vector<tString>& GPM_PatternFunction::getNodeGroupIds ( ) const
inlineinherited

get the variables names to define the group name of nodes

Referenced by GPMG_RulesWindow::componentClicked(), GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

static ostream& CORE_Object::getOutput ( )
inlinestaticinherited

get output

const map<int,tBoolean>& GPM_PatternFunction::getPatternEdgesToKeep ( ) const
inlineinherited

get the pattern edges list to keep

Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

void GPM_PatternFunction::getPatternEdgesToKeep ( vector< int > &  ids) const
inlineinherited

get the edges to keep from associated pattern graph

const map<int,tBoolean>& GPM_PatternFunction::getPatternEdgesToRemove ( ) const
inlineinherited

get the pattern edges list to remove

Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

void GPM_PatternFunction::getPatternEdgesToRemove ( vector< int > &  ids) const
inlineinherited

get the edges to remove from associated pattern graph

const GPM_PortGraph& GPM_Function::getPatternGraph ( ) const
inlineinherited
GPM_PortGraph& GPM_Function::getPatternGraph ( )
inlineinherited

get the pattern graph for writing

References null.

const SV::GPM_Edge& GPM_PatternFunction::getPatternTransformEdgesToAdd ( ) const
inlineinherited

get the edges to ad dfrom pattern graph to transformed graph

Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

SV::GPM_Edge& GPM_PatternFunction::getPatternTransformEdgesToAdd ( )
inlineinherited

get the edges to ad dfrom pattern graph to transformed graph

const map<int,tBoolean>& GPM_PatternFunction::getPatternVerticesToKeep ( ) const
inlineinherited

get the pattern vertices list to keep

Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

void GPM_PatternFunction::getPatternVerticesToKeep ( vector< int > &  ids) const
inlineinherited

get the vertices to keep from associated pattern graph

const map<int,tBoolean>& GPM_PatternFunction::getPatternVerticesToRemove ( ) const
inlineinherited

get the pattern vertices list to remove

Referenced by GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

void GPM_PatternFunction::getPatternVerticesToRemove ( vector< int > &  ids) const
inlineinherited

get the vertices to remove from associated pattern graph

tString CORE_Object::getPointerAddress ( ) const
inlineinherited

return the identity string of the object

Returns
the identity string of the object

References CORE_Object::pointer2String().

Here is the call graph for this function:

const vector<tString>& GPM_PatternFunction::getPortGroupIds ( ) const
inlineinherited

get the variables names to define the group name of ports

Referenced by GPMG_RulesWindow::componentClicked(), GPM_PatternFunction::copy(), and saveRulesToFile().

Here is the caller graph for this function:

SP::GPM_Edge GPM_PatternFunction::getPTEdge ( const int &  index) const
inlineinherited

get the i-th edge to add

Parameters
indexindex of the PT edge to add
sourcesource vertex id from the pattern graph targer: target vertex id from the transfomer graph

Referenced by readRulesFromFile(), and toString().

Here is the caller graph for this function:

int GPM_PatternFunction::getPTEdgesNumber ( ) const
inlineinherited

get the number of edges to add

Referenced by toString().

Here is the caller graph for this function:

void CORE_Object::getSharedPointer ( SP::CORE_Object &  p)
inlineinherited
void CORE_Object::getSharedPointer ( SPC::CORE_Object &  p) const
inlineinherited

get the shared pointer of this class into p

const GPM_PortGraph& GPM_Function::getTransformerGraph ( ) const
inlineinherited
GPM_PortGraph& GPM_Function::getTransformerGraph ( )
inlineinherited

get the transformer graph for writing

References null.

template<class T >
static tString CORE_Object::getTypeName ( )
inlinestaticinherited

get type name

References tString.

tFlag GPM_PatternFunction::getUpToAutomorphismType ( ) const
inlineinherited

return the type of graph element to be up to automorphism

Referenced by GPM_PatternFunction::copy().

Here is the caller graph for this function:

void GPM_PatternFunction::initGroupNames ( GPM_PortGraph graph,
CORE_Out io 
) const
inherited

init the group name id

References GPM_PortGraph::initGroupNames().

Here is the call graph for this function:

static tBoolean CORE_Object::is32Architecture ( )
inlinestaticinherited

return true if the machine is a 32 bits machine

References CORE_Object::is64Architecture().

Here is the call graph for this function:

tBoolean CORE_Object::is64Architecture ( )
staticinherited

return true if the machine is a 64 bits machine

Referenced by CORE_Object::is32Architecture().

Here is the caller graph for this function:

tBoolean GPM_PatternFunction::isEdgeCut ( const int &  id) const
inlineinherited

return true if the edge is cut

tBoolean GPM_PatternFunction::isEdgeKept ( const int &  id) const
inlineinherited

return true if the edge is keep

template<class T >
tBoolean CORE_Object::isInstanceOf ( ) const
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().

Here is the caller graph for this function:

tBoolean GPM_ModelFunction::isMappingValid ( const GPM_PortGraph largeGraph,
const SV::GPM_Vertex &  smallGraphVertices,
const vector< tVertexIID > &  mapping,
CORE_Out io 
) const
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.

Here is the call graph for this function:

tBoolean GPM_PatternFunction::isPEdgeToKeep ( const int &  id) const
inlineinherited

return true if the edge has already a keep trigger action

tBoolean GPM_PatternFunction::isPEdgeToRemove ( const int &  id)
inlineinherited

return true if the edge has already a cut trigger action

tBoolean GPM_PatternFunction::isPVertexMustBeKept ( const int &  id) const
inlineinherited

return true if the vertex must be kept

tBoolean GPM_PatternFunction::isPVertexToKeep ( const int &  id) const
inlineinherited

return true if the vertex has already a keep trigger action

tBoolean GPM_PatternFunction::isPVertexToRemove ( const int &  id) const
inlineinherited

return true if the vertex has already a cut trigger action

tBoolean GPM_PatternFunction::isUpToAutomorphism ( ) const
inlineinherited

return true if the function is up to automorphism

Referenced by GPM_PatternFunction::copy(), saveRulesToFile(), and GPM_PatternFunction::setIsUpToAutomorphism().

Here is the caller graph for this function:

tBoolean GPM_PatternFunction::isValid ( ) const
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().

Here is the call graph for this function:

Here is the caller graph for this function:

tBoolean GPM_PatternFunction::isVertexCut ( const int &  id) const
inlineinherited

return true if the vertex is cut

tBoolean GPM_PatternFunction::isVertexKept ( const int &  id) const
inlineinherited

return true if the vertex is kept

static SP::GPM_ModelFunction GPM_ModelFunction::New ( )
inlinestatic

create a port

References GPM_ModelFunction().

Referenced by GPMG_Project::loadData().

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_Object::outputPrint ( const tString message)
staticinherited

print on output

References null, and CORE_Object::print().

Referenced by CORE_Exception::CORE_Exception().

Here is the call graph for this function:

Here is the caller graph for this function:

tBoolean GPM_ModelFunction::parseVarName ( tString varName,
tString graphLetter,
tString elementLetter,
int &  id 
)
static

useful function to parse varname & id

References CORE_Integer::parseInt().

Referenced by readRulesFromFile(), and GPMG_GraphElementWindow::updateValues().

Here is the call graph for this function:

Here is the caller graph for this function:

tString CORE_Object::pointer2String ( const void *  obj)
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().

Here is the caller graph for this function:

virtual void CORE_Object::print ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual ostream& CORE_Object::print ( ostream &  out) const
inlinevirtualinherited

print the class

References CORE_Object::print(), and CORE_Object::toString().

Here is the call graph for this function:

void CORE_Object::print ( const tString message)
virtualinherited

print the class

Reimplemented in CORE_Out.

References null, and CORE_Object::print().

Here is the call graph for this function:

void CORE_Object::print ( const tInteger str)
virtualinherited

print

References null.

void CORE_Object::print ( const tRelativeInteger str)
virtualinherited

print

References null.

void CORE_Object::print ( const tReal str)
virtualinherited

print

References null.

void CORE_Object::print ( const int &  str)
virtualinherited

print

References null.

static ostream& CORE_Object::print ( ostream &  out,
const tString message 
)
inlinestaticinherited

print the class

void CORE_Object::printObjectsInMemory ( )
staticinherited

print object in memory

References CORE_Object::getClassName(), CORE_Object::getSharedPointer(), and CORE_Object::mIsMemoryTesting.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

void GPM_ModelFunction::removeGlobalVariable ( const tString name)

delete a global variable

void GPM_PatternFunction::removeLastPTEdge ( )
inlineinherited

remove the last edge (source,target) source in pattern graph , target in transformed graph

References GPM_PatternFunction::removePTEdgeToAdd().

Here is the call graph for this function:

void GPM_ModelFunction::removeMappingRule ( const int &  index)
inline

remove the mapping rule at index

Referenced by GPMG_RulesWindow::componentClicked().

Here is the caller graph for this function:

void GPM_PatternFunction::removePEdgeToKeep ( const int &  eid)
inlineinherited

remove the edge to keep from pattern graph

void GPM_PatternFunction::removePEdgeToRemove ( const int &  eid)
inlineinherited

remove the edge to remove from pattern graph

void GPM_PatternFunction::removePTEdgeToAdd ( SP::GPM_Edge  edge)
inlineinherited

remove the edge (source,target)

Parameters
source: id of the source node in pattern graph
targetid of the target node in transformer graph

Referenced by GPM_PatternFunction::removeLastPTEdge().

Here is the caller graph for this function:

void GPM_PatternFunction::removePTEdgeToAdd ( const int &  source,
const int &  target 
)
inherited

remove the edge (source,target)

Parameters
source: id of the source node in pattern graph
targetid of the target node in transformer graph

References GPM_PatternFunction::removePVertexToKeep().

Here is the call graph for this function:

void GPM_PatternFunction::removePTEdgeToAddWithSource ( const int &  sourceId)
inherited

remove the edge for pattern &transform graph with source

Parameters
sourceId: id of the source node in pattern graph

References GPM_PatternFunction::removePVertexToKeep().

Here is the call graph for this function:

void GPM_PatternFunction::removePTEdgeToAddWithTarget ( const int &  targetId)
inherited

remove the edge for pattern &transform graph with target

Parameters
targetId: id of the source node in pattern graph
void GPM_PatternFunction::removePVertexToKeep ( const int &  vid)
inlineinherited

remove the vertex to keep from pattern graph

Referenced by GPM_PatternFunction::removePTEdgeToAdd(), and GPM_PatternFunction::removePTEdgeToAddWithSource().

Here is the caller graph for this function:

void GPM_PatternFunction::removePVertexToRemove ( const int &  vid)
inlineinherited

remove the vertex to remove from pattern graph

void GPM_PatternFunction::removeVariableNameToNodeGroupId ( const int &  index)
inlineinherited

remove the state at index to build the group id of node

Referenced by GPMG_RulesWindow::componentClicked().

Here is the caller graph for this function:

void GPM_PatternFunction::removeVariableNameToPortGroupId ( const int &  index)
inlineinherited

remove the state at index to build the group id of port

Referenced by GPMG_RulesWindow::componentClicked().

Here is the caller graph for this function:

tBoolean GPM_ModelFunction::saveRulesToFile ( const tString fileName) const
void GPM_ModelFunction::setGlobalFunctions ( const SV::GPM_CompositorFunction &  fcts)
inline

set the global functions

Referenced by copy(), and GPMG_Project::updateGraphsEnvironments().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void GPM_PatternFunction::setIsUpToAutomorphism ( const tBoolean isUpToAutomorphism)
inlineinherited

set is up to automorphism

References GPM_PatternFunction::isUpToAutomorphism().

Referenced by GPMG_RulesWindow::componentClicked(), and readRulesFromFile().

Here is the call graph for this function:

Here is the caller graph for this function:

static void CORE_Object::setOutput ( ostream &  out)
inlinestaticinherited

set output

void GPM_Function::setPatternGraph ( SP::GPM_PortGraph  f)
inlineinherited

set the pattern graph

Referenced by toDoAfterThisSetting().

Here is the caller graph for this function:

void CORE_Object::setThis ( SP::CORE_Object  p)
inlineprotectedinherited

set this weak shared pointer called toDoAfterThis setting method

References CORE_Object::toDoAfterThisSetting().

Here is the call graph for this function:

void GPM_Function::setTransformerGraph ( SP::GPM_PortGraph  f)
inlineinherited

set the transformer graph

Referenced by toDoAfterThisSetting().

Here is the caller graph for this function:

virtual void CORE_Object::setType ( tString  type)
inlineprotectedvirtualinherited
void GPM_PatternFunction::setUpToAutomorphismType ( const tFlag upToAutomorphismType)
inlineinherited

Referenced by readRulesFromFile().

Here is the caller graph for this function:

virtual void GPM_ModelFunction::toDoAfterThisSetting ( )
inlineprotectedvirtual

method called after this setting

Reimplemented from GPM_Function.

References GPM_ModelGraph::New(), GPM_Function::setPatternGraph(), GPM_Function::setTransformerGraph(), and GPM_Function::toDoAfterThisSetting().

Here is the call graph for this function:

tString GPM_ModelFunction::toString ( ) const
virtual
static void GPM_Object::turnBodyLineToText ( tString bdy)
inlinestaticinherited

brief turn the body from the line to text

References CORE_String::replaceAll().

Referenced by GPMG_Project::loadFromUIClass(), and readRulesFromFile().

Here is the call graph for this function:

Here is the caller graph for this function:

static void GPM_Object::turnBodyTextToLine ( tString bdy)
inlinestaticinherited

brief turn the body from the text to line

References CORE_String::replaceAll().

Referenced by saveRulesToFile(), and GPMG_Project::saveToUIClass().

Here is the call graph for this function:

Here is the caller graph for this function:

tBoolean GPM_ModelFunction::updatePatternGraphStates ( GPM_Graph largeGraph,
const vector< tVertexIID > &  mappingP2L,
CORE_Out io 
)
protectedvirtual
tBoolean GPM_ModelFunction::updatePTEdgesStates ( SP::GPM_Edge  PTedge,
SP::GPM_Edge  ledge,
GPM_Graph largeGraph,
const vector< tVertexIID > &  mappingP2L,
const map< tVertexIID, tVertexIID > &  mappingT2L,
CORE_Out io 
)
protectedvirtual
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().

Here is the call graph for this function:

tBoolean GPM_ModelFunction::updateTransformerGraphStates ( GPM_Graph largeGraph,
const vector< tVertexIID > &  mappingP2L,
const map< tVertexIID, tVertexIID > &  mappingT2L,
CORE_Out io 
)
protectedvirtual
tString GPM_ModelFunction::varNameToString ( const tString varName,
const tString graphLetter,
const tString elementLetter,
const int &  id 
)
static

useful function to create varname from vertex

References CORE_Integer::toString(), and tString.

Referenced by expandVariableNames(), saveRulesToFile(), and GPMG_GraphElementWindow::updateValues().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

tBoolean CORE_Object::mIsMemoryTesting =false
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().


The documentation for this class was generated from the following files: