Version: 8.3.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 ()
 
void simplify ()
 
std::string getRepr () const
 
AbstractPointfindPointWithNode (Node *node)
 
const std::list< AbstractPoint * > & getListOfPoints () const
 
int getMaxLevelOfParallelism () const
 

Private Attributes

BagPoint_bp
 

Detailed Description

Definition at line 36 of file SetOfPoints.hxx.

Constructor & Destructor Documentation

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

Definition at line 31 of file SetOfPoints.cxx.

References _bp.

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 }
SetOfPoints::~SetOfPoints ( )

Definition at line 41 of file SetOfPoints.cxx.

References _bp.

42 {
43  if(!_bp)
44  return;
45  delete _bp;
46 }

Member Function Documentation

AbstractPoint * SetOfPoints::findPointWithNode ( Node node)

Definition at line 73 of file SetOfPoints.cxx.

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

74 {
75  if(node==0)
76  return 0;
77  return _bp->findPointWithNode(node);
78 }
const std::list< AbstractPoint * > & SetOfPoints::getListOfPoints ( ) const

Definition at line 80 of file SetOfPoints.cxx.

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

81 {
82  return _bp->getListOfPoints();
83 }
int SetOfPoints::getMaxLevelOfParallelism ( ) const

Definition at line 85 of file SetOfPoints.cxx.

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

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

86 {
87  return _bp->getMaxLevelOfParallelism();
88 }
std::string SetOfPoints::getRepr ( ) const

Definition at line 68 of file SetOfPoints.cxx.

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

69 {
70  return _bp->getRepr();
71 }
void SetOfPoints::simplify ( )

Definition at line 48 of file SetOfPoints.cxx.

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

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

49 {
50  while(_bp->size()>1)
51  {
52  bool somethingDone(false);
53  _bp->deal1(somethingDone);
54  if(somethingDone)
55  continue;
56  _bp->deal2(somethingDone);
57  if(somethingDone)
58  continue;
59  _bp->deal2Bis(somethingDone);
60  if(somethingDone)
61  continue;
62  _bp->deal2Ter(somethingDone);
63  if(!somethingDone)
64  throw Exception("SetOfPoints::simplify : not implemented yet !");
65  }
66 }

Member Data Documentation

BagPoint* YACS::ENGINE::SetOfPoints::_bp
private

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