Version: 9.15.0
YACS::ENGINE::SetOfPoints Class Reference

#include <SetOfPoints.hxx>

Collaboration diagram for YACS::ENGINE::SetOfPoints:

Public Member Functions

 SetOfPoints (const std::list< Node * > &nodes)
 
 SetOfPoints (BagPoint *bp)
 
 ~SetOfPoints ()
 
void basicSimplify ()
 
void simplify ()
 
std::string getRepr () const
 
AbstractPointfindPointWithNode (Node *node)
 
const std::list< AbstractPoint * > & getListOfPoints () const
 
int getMaxLevelOfParallelism () const
 
void getWeightRegardingDPL (ComplexWeight *weight)
 
void partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap) const
 
AbstractPointgetUniqueAndReleaseIt () const
 
void accept (PointVisitor *pv)
 

Private Attributes

BagPoint_bp
 

Detailed Description

Definition at line 41 of file SetOfPoints.hxx.

Constructor & Destructor Documentation

◆ SetOfPoints() [1/2]

SetOfPoints::SetOfPoints ( const std::list< Node * > &  nodes)

Definition at line 31 of file SetOfPoints.cxx.

31  :_bp(0)
32 {
33  std::list<AbstractPoint *> nodes2;
34  for(std::list<Node *>::const_iterator it=nodes.begin();it!=nodes.end();it++)
35  {
36  nodes2.push_back(new ElementaryPoint(*it));
37  }
38  _bp=new BagPoint(nodes2,0);
39 }

References _bp.

◆ SetOfPoints() [2/2]

YACS::ENGINE::SetOfPoints::SetOfPoints ( BagPoint bp)
inline

Definition at line 45 of file SetOfPoints.hxx.

45 :_bp(bp) { }

◆ ~SetOfPoints()

SetOfPoints::~SetOfPoints ( )

Definition at line 41 of file SetOfPoints.cxx.

42 {
43  delete _bp;
44 }

References _bp.

Member Function Documentation

◆ accept()

void SetOfPoints::accept ( PointVisitor pv)

Definition at line 136 of file SetOfPoints.cxx.

137 {
138  _bp->accept(pv);
139 }
void accept(PointVisitor *pv) override
Definition: BagPoint.cxx:38

References _bp, and YACS::ENGINE::BagPoint::accept().

◆ basicSimplify()

void SetOfPoints::basicSimplify ( )

Definition at line 46 of file SetOfPoints.cxx.

47 {
48  while(_bp->size()>1)
49  {
50  bool somethingDone(false);
51  _bp->deal1(somethingDone);
52  if(somethingDone)
53  continue;
54  _bp->deal2(somethingDone);
55  if(somethingDone)
56  continue;
57  _bp->deal2Bis(somethingDone);
58  if(somethingDone)
59  continue;
60  _bp->deal2Ter(somethingDone);
61  if(somethingDone)
62  continue;
63  _bp->deal2Quatro(somethingDone);
64  if(!somethingDone)
65  throw Exception("SetOfPoints::simplify : not implemented yet !\nPlease check if there are any recursively redundant links (can be removed by removeRecursivelyRedundantCL method).");
66  }
67 }
void deal2Quatro(bool &somethingDone)
Definition: BagPoint.cxx:178
void deal2Bis(bool &somethingDone)
Definition: BagPoint.cxx:144
void deal1(bool &somethingDone)
Definition: BagPoint.cxx:109
void deal2(bool &somethingDone)
Definition: BagPoint.cxx:127
void deal2Ter(bool &somethingDone)
Definition: BagPoint.cxx:161

References _bp, YACS::ENGINE::BagPoint::deal1(), YACS::ENGINE::BagPoint::deal2(), YACS::ENGINE::BagPoint::deal2Bis(), YACS::ENGINE::BagPoint::deal2Quatro(), YACS::ENGINE::BagPoint::deal2Ter(), and YACS::ENGINE::BagPoint::size().

Referenced by YACS::ENGINE::AbstractPoint::TryAsNotSimpleCase().

◆ findPointWithNode()

AbstractPoint * SetOfPoints::findPointWithNode ( Node node)

Definition at line 104 of file SetOfPoints.cxx.

105 {
106  if(node==0)
107  return 0;
108  return _bp->findPointWithNode(node);
109 }
AbstractPoint * findPointWithNode(Node *node)
Definition: BlocPoint.cxx:52

References _bp, and YACS::ENGINE::BlocPoint::findPointWithNode().

◆ getListOfPoints()

const std::list< AbstractPoint * > & SetOfPoints::getListOfPoints ( ) const

Definition at line 111 of file SetOfPoints.cxx.

112 {
113  return _bp->getListOfPoints();
114 }
const std::list< AbstractPoint * > & getListOfPoints() const
Definition: BlocPoint.hxx:46

References _bp, and YACS::ENGINE::BlocPoint::getListOfPoints().

◆ getMaxLevelOfParallelism()

int SetOfPoints::getMaxLevelOfParallelism ( ) const

Definition at line 116 of file SetOfPoints.cxx.

117 {
118  return _bp->getMaxLevelOfParallelism();
119 }
int getMaxLevelOfParallelism() const
Definition: BagPoint.cxx:71

References _bp, and YACS::ENGINE::BagPoint::getMaxLevelOfParallelism().

◆ getRepr()

std::string SetOfPoints::getRepr ( ) const

Definition at line 99 of file SetOfPoints.cxx.

100 {
101  return _bp->getRepr();
102 }
std::string getRepr() const
Definition: BagPoint.cxx:86

References _bp, and YACS::ENGINE::BagPoint::getRepr().

◆ getUniqueAndReleaseIt()

AbstractPoint * SetOfPoints::getUniqueAndReleaseIt ( ) const

◆ getWeightRegardingDPL()

void SetOfPoints::getWeightRegardingDPL ( ComplexWeight weight)

Definition at line 121 of file SetOfPoints.cxx.

122 {
123  _bp->getWeightRegardingDPL(weight);
124 }
void getWeightRegardingDPL(ComplexWeight *weight)
Definition: BagPoint.cxx:76

References _bp, and YACS::ENGINE::BagPoint::getWeightRegardingDPL().

◆ partitionRegardingDPL()

void SetOfPoints::partitionRegardingDPL ( const PartDefinition pd,
std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &  zeMap 
) const

Definition at line 126 of file SetOfPoints.cxx.

127 {
128  _bp->partitionRegardingDPL(pd,zeMap);
129 }
void partitionRegardingDPL(const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap) const
Definition: BagPoint.cxx:81

References _bp, and YACS::ENGINE::BagPoint::partitionRegardingDPL().

◆ simplify()

void SetOfPoints::simplify ( )

Definition at line 69 of file SetOfPoints.cxx.

70 {
72  {
73  bool somethingDone(false);
74  _bp->deal1(somethingDone);
75  if(somethingDone)
76  continue;
77  _bp->deal2(somethingDone);
78  if(somethingDone)
79  continue;
80  _bp->deal2Bis(somethingDone);
81  if(somethingDone)
82  continue;
83  _bp->deal2Ter(somethingDone);
84  if(somethingDone)
85  continue;
86  _bp->deal2Quatro(somethingDone);
87  if(somethingDone)
88  continue;
89  _bp->dealNotSimpleCase(somethingDone);
90  if(!somethingDone)
91  throw Exception("SetOfPoints::simplify : not implemented yet !\nPlease check if there are any recursively redundant links (can be removed by removeRecursivelyRedundantCL method).");
92  }
94  {
96  }
97 }
void dealNotSimpleCase(bool &somethingDone)
Definition: BagPoint.cxx:199
bool presenceOfNonSimpleCase() const
Definition: BlocPoint.cxx:165
bool internalContinueForSimplify() const
Definition: BlocPoint.cxx:158

References _bp, YACS::ENGINE::BagPoint::deal1(), YACS::ENGINE::BagPoint::deal2(), YACS::ENGINE::BagPoint::deal2Bis(), YACS::ENGINE::BagPoint::deal2Quatro(), YACS::ENGINE::BagPoint::deal2Ter(), YACS::ENGINE::BagPoint::dealNotSimpleCase(), YACS::ENGINE::BagPoint::expandNonSimpleCase(), YACS::ENGINE::BlocPoint::internalContinueForSimplify(), and YACS::ENGINE::BlocPoint::presenceOfNonSimpleCase().

Referenced by YACS::ENGINE::Bloc::analyzeParallelism().

Member Data Documentation

◆ _bp


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