10 typedef std::map<std::string,unsigned int>::iterator itT;
11 std::pair<itT,bool>
result =
indexer().insert( std::make_pair( name, temp ));
16 names().push_back( name );
20 id_ = result.first->second;
43 std::vector<DDValuePair>::const_iterator it = v.begin();
44 std::vector<std::string> svec;
45 std::vector<double> dvec;
48 for(; it != v.end(); ++it )
50 vecPair_->second.first.push_back( it->first );
51 vecPair_->second.second.push_back( it->second );
61 std::vector<std::string> svec( 1,
"" );
62 std::vector<double> dvec( 1, val );
74 std::vector<std::string> svec( 1, sval );
75 std::vector<double> dvec( 1, dval );
86 std::vector<std::string> svec( 1, sval );
87 std::vector<double> dvec( 1, 0 );
107 std::vector<boost::shared_ptr<vecpair_type> > &
v =
mem( 0 );
111 std::map<std::string, unsigned int>&
114 static std::map<std::string,unsigned int> indexer_;
118 std::vector<std::string>&
121 static std::vector<std::string> names_( 1 );
125 std::vector<boost::shared_ptr<DDValue::vecpair_type> >&
128 static std::vector<boost::shared_ptr<vecpair_type> > memory_;
129 memory_.push_back( boost::shared_ptr<vecpair_type>( vp ));
133 const std::vector<double> &
142 std::string
message =
"DDValue " +
names()[
id_] +
" is not numerically evaluated! Use DDValue::std::strings()!";
150 o << v.
name() <<
" = ";
154 for(; i < v.
size(); ++
i )
156 o <<
'(' << v[
i].first <<
',' << v[
i].second <<
") ";
161 const std::vector<std::string> &
s = v.
strings();
162 for(; i < v.
size(); ++
i )
173 return o << v.second;
185 std::string
message =
"DDValue " +
names()[
id_] +
" is not numerically evaluated! Use DDValue::std::strings()!";
const std::string & name(void) const
the name of the DDValue
static std::vector< boost::shared_ptr< vecpair_type > > & mem(vecpair_type *)
static std::vector< std::string > & names()
DDValue(void)
create a unnamed emtpy value. One can assing a named DDValue to it.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
std::pair< bool, std::pair< std::vector< std::string >, std::vector< double > > > vecpair_type
static std::map< std::string, unsigned int > & indexer()
void setEvalState(bool newState)
set to true, if the double-values (method DDValue::doubles()) make sense
std::ostream & operator<<(std::ostream &out, const ALILine &li)
unsigned int id(void) const
returns the ID of the DDValue
bool isEvaluated(void) const
true, if values are numerical evaluated; else false.
void init(const std::string &)
bool operator==(const DDValue &v) const
Two DDValues are equal only if their id() is equal AND their values are equal.
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
DDValuePair operator[](unsigned int i) const
bool operator<(const DDValue &) const
A DDValue a is smaller than a DDValue b if (a.id()<b.id()) OR (a.id()==b.id() and value(a)<value(b)) ...
unsigned int size() const
the size of the stored value-pairs (std::string,double)