PC::PowerCircuit Class Reference

#include <PowerCircuit.h>

Inheritance diagram for PC::PowerCircuit:
PC::PowerCircuitCompMatrix PC::PowerCircuitGraph

List of all members.

Public Member Functions

 PowerCircuit ()
virtual ~PowerCircuit ()
virtual void reduce ()=0
virtual void reduce (std::vector< Node > &nodeVector, std::vector< Marking > &markingVector)=0
virtual Marking createMarking (int i=0)=0
virtual Marking createMarking (const std::list< Node > &nodes)=0
virtual Marking createMarking (const std::list< Node > &nodeList, const std::list< int > &signList)=0
virtual Marking createMarkingFromNodes (unsigned int numNodes,...)
virtual Node createNode (const Marking &succ)=0
virtual void connect (const Marking &m, const Marking &p)=0
virtual void connectInv (const Marking &m, const Marking &p)=0
virtual void remove (const Marking &m)=0
virtual Node getReducedNode (unsigned int ord)=0
virtual std::list< NodegetNodes ()=0
virtual std::list< MarkinggetMarkings ()=0
virtual std::list< NodegetMarkingNodes (const Marking &m)=0
virtual PowerCircuitclone (std::vector< Marking > &markingsToClone)=0
virtual void draw (std::string filename, Marking highlight1=Marking(), Marking highlight2=Marking(), Marking highlight3=Marking(), Marking highlight4=Marking(), Marking highlight5=Marking(), Marking highlight6=Marking(), Marking highlight7=Marking(), Marking highlight8=Marking(), Marking highlight9=Marking())
int getNumEdges ()
int getNumNodes ()
int getNumMarkings ()
virtual void printStatistics (std::ostream &os=std::cout)
virtual void print (std::ostream &os=std::cout)=0

Private Member Functions

virtual void incMarkingRefCount (const Marking &mark)=0
virtual void decMarkingRefCount (Marking &mark)=0
virtual Marking addMarkings (const Marking &m1, const Marking &m2)=0
virtual Marking invMarking (const Marking &m)=0
virtual Marking incMarking (const Marking &m)=0
virtual Marking intersectMarkings (const Marking &m1, const Marking &m2)=0
virtual Marking cloneMarking (const Marking &m)=0
virtual Node cloneNode (Node n)=0
virtual Marking copyMarking (const Marking &m)=0
virtual bool isMarkingReduced (const Marking &m) const =0
virtual int compareMarkings (const Marking &m1, const Marking &m2)=0
virtual int getRedNodeOrd (Node n)=0
virtual int getNodeSignInMarking (Node n, const Marking &m) const =0
virtual bool isSuccessorMarking (const Marking &m) const =0
virtual Node getIncidentNode (const Marking &m)=0
virtual Node getSmallestNodeInMarking (const Marking &m)=0
virtual Marking getSuccMarking (Node n)=0

Friends

class Node
class Marking

Detailed Description

Abstract base class for all implementations of power circuits. The PowerCircuit class provides methods to create markings, perform the reduction procedure, draw edges in the graph (connect), and some additional tasks.

Definition at line 170 of file PowerCircuit.h.


Constructor & Destructor Documentation

PC::PowerCircuit::PowerCircuit (  )  [inline]

Definition at line 200 of file PowerCircuit.h.

virtual PC::PowerCircuit::~PowerCircuit (  )  [inline, virtual]

Definition at line 201 of file PowerCircuit.h.


Member Function Documentation

virtual Marking PC::PowerCircuit::addMarkings ( const Marking m1,
const Marking m2 
) [private, pure virtual]
virtual PowerCircuit* PC::PowerCircuit::clone ( std::vector< Marking > &  markingsToClone  )  [pure virtual]

Makes a copy of a PowerCircuit. Only the markings in the markingsToClone list are available in the cloned circuit. Reduced nodes and markings are remain reduced. The clone has to be deallocated via delete, once it is not needed anymore!

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual Marking PC::PowerCircuit::cloneMarking ( const Marking m  )  [private, pure virtual]
virtual Node PC::PowerCircuit::cloneNode ( Node  n  )  [private, pure virtual]
virtual int PC::PowerCircuit::compareMarkings ( const Marking m1,
const Marking m2 
) [private, pure virtual]
virtual void PC::PowerCircuit::connect ( const Marking m,
const Marking p 
) [pure virtual]

Adds the marking p to all successor markings of nodes in the support of m. (So, if supp(m) and supp(p) are disjoint, that means, that arrows are drawn from all nodes in supp(m) to p). The user has to assure that, for each node, the sum lies in the range [-1,+1] (for example using clone())! The user is required to check that the resulting graph has no cycles and no successor marking becomes negative. All nodes in supp(m) have to be non-reduced (use clone() to assure that).

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual void PC::PowerCircuit::connectInv ( const Marking m,
const Marking p 
) [pure virtual]

The same as connect, only that the marking p is subtracted instead of added.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual Marking PC::PowerCircuit::copyMarking ( const Marking m  )  [private, pure virtual]
virtual Marking PC::PowerCircuit::createMarking ( const std::list< Node > &  nodeList,
const std::list< int > &  signList 
) [pure virtual]

Creates a new marking, with the nodes in nodeList set to the respective sign in signList.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual Marking PC::PowerCircuit::createMarking ( const std::list< Node > &  nodes  )  [pure virtual]

Creates a new marking, with the nodes in nodeList set to 1.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual Marking PC::PowerCircuit::createMarking ( int  i = 0  )  [pure virtual]

Creates a new marking with value val. The therefore required nodes are inserted into the reduced part of the PC.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual Marking PC::PowerCircuit::createMarkingFromNodes ( unsigned int  numNodes,
  ... 
) [virtual]

Creates a new marking, with the nodes set to 1. As first argument it requires the number of nodes set to one. The other arguments are the respective nodes.

virtual Node PC::PowerCircuit::createNode ( const Marking succ  )  [pure virtual]

Creates a new node with a copy of m as successor-marking.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual void PC::PowerCircuit::decMarkingRefCount ( Marking mark  )  [private, pure virtual]
virtual void PC::PowerCircuit::draw ( std::string  filename,
Marking  highlight1 = Marking(),
Marking  highlight2 = Marking(),
Marking  highlight3 = Marking(),
Marking  highlight4 = Marking(),
Marking  highlight5 = Marking(),
Marking  highlight6 = Marking(),
Marking  highlight7 = Marking(),
Marking  highlight8 = Marking(),
Marking  highlight9 = Marking() 
) [virtual]
virtual Node PC::PowerCircuit::getIncidentNode ( const Marking m  )  [private, pure virtual]
virtual std::list<Node> PC::PowerCircuit::getMarkingNodes ( const Marking m  )  [pure virtual]

Returns a list of all nodes which are non-zero in the marking m.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual std::list<Marking> PC::PowerCircuit::getMarkings (  )  [pure virtual]

Returns a list of all markings in the PowerCircuit.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual std::list<Node> PC::PowerCircuit::getNodes (  )  [pure virtual]

Returns a list of all nodes in the PowerCircuit.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual int PC::PowerCircuit::getNodeSignInMarking ( Node  n,
const Marking m 
) const [private, pure virtual]
int PC::PowerCircuit::getNumEdges (  ) 
int PC::PowerCircuit::getNumMarkings (  ) 
int PC::PowerCircuit::getNumNodes (  ) 
virtual int PC::PowerCircuit::getRedNodeOrd ( Node  n  )  [private, pure virtual]
virtual Node PC::PowerCircuit::getReducedNode ( unsigned int  ord  )  [pure virtual]

Returns the node with index ord (that means there are ord smaller nodes in the reduced part of the PC) If there are less than ord nodes, the undefined node is returned.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual Node PC::PowerCircuit::getSmallestNodeInMarking ( const Marking m  )  [private, pure virtual]
virtual Marking PC::PowerCircuit::getSuccMarking ( Node  n  )  [private, pure virtual]
virtual Marking PC::PowerCircuit::incMarking ( const Marking m  )  [private, pure virtual]
virtual void PC::PowerCircuit::incMarkingRefCount ( const Marking mark  )  [private, pure virtual]
virtual Marking PC::PowerCircuit::intersectMarkings ( const Marking m1,
const Marking m2 
) [private, pure virtual]
virtual Marking PC::PowerCircuit::invMarking ( const Marking m  )  [private, pure virtual]
virtual bool PC::PowerCircuit::isMarkingReduced ( const Marking m  )  const [private, pure virtual]
virtual bool PC::PowerCircuit::isSuccessorMarking ( const Marking m  )  const [private, pure virtual]
virtual void PC::PowerCircuit::print ( std::ostream &  os = std::cout  )  [pure virtual]

Prints the adjacency matrix of the underlying graph.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual void PC::PowerCircuit::printStatistics ( std::ostream &  os = std::cout  )  [virtual]

Prints some statistical data.

Reimplemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual void PC::PowerCircuit::reduce ( std::vector< Node > &  nodeVector,
std::vector< Marking > &  markingVector 
) [pure virtual]

Moves all nodes in nodeList and markings in markingList to the reduced part of the PC. Nodes in nodeList MUST NOT be reduced! The support of markings in markingList has to be in nodeList or the already reduced part of the PC.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual void PC::PowerCircuit::reduce (  )  [pure virtual]

Reduces the whole PC and all its markings.

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.

virtual void PC::PowerCircuit::remove ( const Marking m  )  [pure virtual]

Deletes all nodes in the given marking. (So if other markings use those nodes, their values may be changed!)

Implemented in PC::PowerCircuitCompMatrix, and PC::PowerCircuitGraph.


Friends And Related Function Documentation

friend class Marking [friend]

Definition at line 196 of file PowerCircuit.h.

friend class Node [friend]

Definition at line 195 of file PowerCircuit.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Sep 26 18:43:53 2011 for CRyptography And Groups (CRAG) by  doxygen 1.6.1