#include <ComplexWeight.hxx>
Definition at line 38 of file ComplexWeight.hxx.
◆ ComplexWeight() [1/3]
| ComplexWeight::ComplexWeight |
( |
| ) |
|
◆ ComplexWeight() [2/3]
| ComplexWeight::ComplexWeight |
( |
double |
elementaryWeight, |
|
|
double |
loopWeight, |
|
|
int |
nbCoresByIteration |
|
) |
| |
Definition at line 36 of file ComplexWeight.cxx.
37{
38 _loopWeight.push_back(std::pair<double,int>(loopWeight,nbCoresByIteration));
39}
std::vector< std::pair< double, int > > _loopWeight
References _loopWeight.
◆ ComplexWeight() [3/3]
| YACS::ENGINE::ComplexWeight::ComplexWeight |
( |
const ComplexWeight & |
other | ) |
|
|
inline |
◆ ~ComplexWeight()
| YACS::ENGINE::ComplexWeight::~ComplexWeight |
( |
| ) |
|
|
inline |
◆ addWeight()
Definition at line 112 of file ComplexWeight.cxx.
113{
114 bool found;
117 else
118 {
119 for(std::vector< std::pair<double,int> >::const_iterator it=other->
_loopWeight.begin();it!=other->
_loopWeight.end();it++)
120 {
121 found=false;
123 {
124 if ((*it).second == (*it2).second)
125 {
126 if (((*it2).first>=0) && ((*it).first>=0))
127 this->
setLoopWeight((*it2).first+(*it).first, (*it2).second);
128 else if ((*it).first>=0)
130 found=true;
131 continue;
132 }
133 }
134 if ((!found) && ((*it).second!=-1))
136 }
139 }
140
143 else
144 {
146 {
149 else
151 }
152 }
155}
bool isDefaultValueElementary() const
bool isDefaultValueLoop() const
void setLoopWeight(double loopWeight, int nbCoresByIteration)
bool isUnsetElementaryWeight() const
bool isUnsetLoopWeight() const
bool hasValidElementaryWeight() const
References _bootWeight, _elementaryWeight, _loopWeight, hasValidElementaryWeight(), isDefaultValueElementary(), isDefaultValueLoop(), isUnsetElementaryWeight(), isUnsetLoopWeight(), setLoopWeight(), unsetElementary(), and unsetLoop().
Referenced by YACS::ENGINE::DynParaLoop::getWeightRegardingDPL(), YACS::ENGINE::ElementaryNode::getWeightRegardingDPL(), YACS::ENGINE::ForkBlocPoint::getWeightRegardingDPL(), YACS::ENGINE::LinkedBlocPoint::getWeightRegardingDPL(), and YACS::ENGINE::NotSimpleCasePoint::getWeightRegardingDPL().
◆ calculateTotalLength()
| double ComplexWeight::calculateTotalLength |
( |
int |
nbOfCoresAllocated | ) |
const |
◆ getElementaryWeight()
| double YACS::ENGINE::ComplexWeight::getElementaryWeight |
( |
| ) |
const |
|
inline |
◆ getLoopWeight()
| std::vector< std::pair< double, int > > YACS::ENGINE::ComplexWeight::getLoopWeight |
( |
| ) |
const |
|
inline |
◆ getNbCoresConsoLoopMax()
| int ComplexWeight::getNbCoresConsoLoopMax |
( |
| ) |
const |
Definition at line 84 of file ComplexWeight.cxx.
85{
86 int nbCoresPerShotLoopMax(0);
87 for(std::vector< std::pair<double,int> >::const_iterator it=
_loopWeight.begin();it!=
_loopWeight.end();it++)
88 if ((*it).second>nbCoresPerShotLoopMax)nbCoresPerShotLoopMax=(*it).second;
89 return nbCoresPerShotLoopMax;
90}
References _loopWeight.
◆ getSimpleLoopWeight()
| double ComplexWeight::getSimpleLoopWeight |
( |
| ) |
const |
◆ hasValidElementaryWeight()
| bool YACS::ENGINE::ComplexWeight::hasValidElementaryWeight |
( |
| ) |
const |
|
inline |
◆ hasValidLoopWeight()
| bool YACS::ENGINE::ComplexWeight::hasValidLoopWeight |
( |
| ) |
const |
|
inline |
◆ isDefaultValue()
| bool YACS::ENGINE::ComplexWeight::isDefaultValue |
( |
| ) |
const |
|
inline |
◆ isDefaultValueElementary()
| bool YACS::ENGINE::ComplexWeight::isDefaultValueElementary |
( |
| ) |
const |
|
inlineprivate |
◆ isDefaultValueLoop()
| bool YACS::ENGINE::ComplexWeight::isDefaultValueLoop |
( |
| ) |
const |
|
inlineprivate |
◆ isUnsetElementaryWeight()
| bool YACS::ENGINE::ComplexWeight::isUnsetElementaryWeight |
( |
| ) |
const |
|
inline |
◆ isUnsetLoopWeight()
| bool YACS::ENGINE::ComplexWeight::isUnsetLoopWeight |
( |
| ) |
const |
|
inline |
◆ max()
Definition at line 92 of file ComplexWeight.cxx.
93{
95
96 double allLoopWeight1(0);
97 double allLoopWeight2(0);
98 for(std::vector< std::pair<double,int> >::const_iterator it=
_loopWeight.begin();it!=
_loopWeight.end();it++)
99 {
100 if (((*it).first>0) && ((*it).second>0))
101 allLoopWeight1+=(*it).first * (*it).second;
102 }
103 for(std::vector< std::pair<double,int> >::const_iterator it=other.
_loopWeight.begin();it!=other.
_loopWeight.end();it++)
104 {
105 if (((*it).first>0) && ((*it).second>0))
106 allLoopWeight2+=(*it).first * (*it).second;
107 }
108 if (allLoopWeight2>allLoopWeight1)
110}
References _elementaryWeight, and _loopWeight.
Referenced by YACS::ENGINE::Switch::getWeightRegardingDPL().
◆ setDefaultElementary()
| void YACS::ENGINE::ComplexWeight::setDefaultElementary |
( |
| ) |
|
|
inline |
◆ setDefaultLoop()
| void YACS::ENGINE::ComplexWeight::setDefaultLoop |
( |
| ) |
|
|
inline |
◆ setElementaryWeight()
| void YACS::ENGINE::ComplexWeight::setElementaryWeight |
( |
double |
elementaryWeight | ) |
|
|
inline |
◆ setLoopWeight()
| void ComplexWeight::setLoopWeight |
( |
double |
loopWeight, |
|
|
int |
nbCoresByIteration |
|
) |
| |
◆ setToZero()
| void YACS::ENGINE::ComplexWeight::setToZero |
( |
| ) |
|
|
inline |
◆ unsetElementary()
| void YACS::ENGINE::ComplexWeight::unsetElementary |
( |
| ) |
|
|
inlineprivate |
◆ unsetLoop()
| void YACS::ENGINE::ComplexWeight::unsetLoop |
( |
| ) |
|
|
inlineprivate |
◆ _bootWeight
| bool YACS::ENGINE::ComplexWeight::_bootWeight |
|
protected |
◆ _elementaryWeight
| double YACS::ENGINE::ComplexWeight::_elementaryWeight |
|
protected |
◆ _loopWeight
| std::vector<std::pair<double,int> > YACS::ENGINE::ComplexWeight::_loopWeight |
|
protected |
The documentation for this class was generated from the following files: