Salome HOME
Optimized algo for PlayGround
[modules/yacs.git] / src / engine / LinkedBlocPoint.cxx
index 666f757e5bbdbd809662c9b1e4ef7a829f2ce4b5..b4d2e7f2f116193d763a731d33de19a433b20565 100644 (file)
@@ -48,12 +48,15 @@ int LinkedBlocPoint::getMaxLevelOfParallelism() const
   return ret;
 }
 
-double LinkedBlocPoint::getWeightRegardingDPL() const
+void LinkedBlocPoint::getWeightRegardingDPL(ComplexWeight *weight)
 {
-  double ret(0.);
+  ComplexWeight localWeight;
   for(std::list<AbstractPoint *>::const_iterator it=_nodes.begin();it!=_nodes.end();it++)
-    ret=std::max(ret,(*it)->getWeightRegardingDPL());
-  return ret;
+  {
+    (*it)->getWeightRegardingDPL(&localWeight);
+    weight->addWeight(&localWeight);
+    localWeight.setToZero();
+  }
 }
 
 void LinkedBlocPoint::partitionRegardingDPL(const PartDefinition *pd, std::map<ComposedNode *, YACS::BASES::AutoRefCnt<PartDefinition> >& zeMap) const