12 :
MINT::PolymorphVector<int>(6, 0)
18 :
MINT::PolymorphVector<int>(other)
30 for(
unsigned int i=0; i < this->
size(); i++){
36 for(
unsigned int i=0; i < this->
size(); i++){
39 unsigned int pos =str.find(
"non-qQ");
40 if(pos < str.size())
return true;
42 std::string localQ = str;
43 pos = localQ.find(
"sqrt");
44 if(pos < localQ.size()){
45 localQ.replace(pos, 4,
"");
49 for(
unsigned int i=0; i < localQ.size(); i++){
50 if(
'd' == localQ[i]) (*this)[0]++;
51 if(
'D' == localQ[i]) (*this)[0]--;
52 if(
'u' == localQ[i]) (*this)[1]++;
53 if(
'U' == localQ[i]) (*this)[1]--;
54 if(
's' == localQ[i]) (*this)[2]++;
55 if(
'S' == localQ[i]) (*this)[2]--;
56 if(
'c' == localQ[i]) (*this)[3]++;
57 if(
'C' == localQ[i]) (*this)[3]--;
58 if(
'b' == localQ[i]) (*this)[4]++;
59 if(
'B' == localQ[i]) (*this)[4]--;
60 if(
't' == localQ[i]) (*this)[5]++;
61 if(
'T' == localQ[i]) (*this)[5]--;
67 return content( (
int) quarkNumber);
70 if(quarkNumber < 0)
return 0;
71 return content( (
unsigned int) quarkNumber);
74 if(quarkNumber >= this->
size())
return 0;
75 return (*
this)[quarkNumber];
79 if(quarkName.empty())
return 0;
87 if(i < 0 || i >=6)
return 'X';
91 map<char, int>::const_iterator it =
_positions.find(c);
93 else return it->second;
97 for(
unsigned int i=0; i < this->
size(); i++){
99 if(i + 1< this->
size()) os <<
" ";
104 unsigned int max = this->
size();
105 if(rhs.
size() < max) max = rhs.
size();
106 for(
unsigned int i=0; i < max; i++){
107 (*this)[i] += rhs[i];
112 unsigned int max = this->
size();
113 if(rhs.
size() < max) max = rhs.
size();
114 for(
unsigned int i=0; i < max; i++){
115 (*this)[i] -= rhs[i];
QuarkContent & operator+=(const QuarkContent &rhs)
QuarkContent operator-(const QuarkContent &rhs) const
std::ostream & operator<<(std::ostream &st, const QuarkContent &qc)
char nameFromPosition(int i) const
static bool initPositions()
static std::map< char, int > _positions
QuarkContent & operator-=(const QuarkContent &rhs)
int content(int quarkNumber) const
QuarkContent operator+(const QuarkContent &rhs) const
bool initFromString(const std::string &str)
unsigned int size() const
void print(std::ostream &os=std::cout) const
int positionFromName(char c) const