33 for(
double it : array->
array)
46 unsigned int size = std::min(a1->
data.size(),a2->
data.size());
48 for(
unsigned int i=0;i<size;i++)
57 unsigned int size = std::min(a1->
data.size(),a2->
data.size());
59 for(
unsigned int i=0;i<size;i++)
68 unsigned int size = a1->
data.size();
70 for(
unsigned int i=0;i<size;i++)
79 unsigned int size = a1->
data.size();
81 for(
unsigned int i=0;i<size;i++)
90 unsigned int size = a1->
data.size();
92 for(
unsigned int i=0;i<size;i++)
101 unsigned int size = a1->
data.size();
103 for(
unsigned int i=0;i<size;i++)
114 std::cerr <<
"ERROR: vector dimensions do not match" << std::endl;
119 for(
unsigned int i=0;i<
data.size();i++)
134 std::cout << d <<
" ";
136 std::cout << std::endl;
139 std::cout << s <<
" ";
141 std::cout << std::endl;
144std::list<std::string> Array::GetSymbolsList()
const
146 std::list<std::string> r;
147 for (
const std::string& s :
symbols)
152std::list<double> Array::GetDataList()
const
155 for (
double d :
data)
Representation of arrays used in tokens.
static Array * Subtract(Array *a1, Array *a2)
Constructor from subtracting 2 double arrays.
static Array * Multiply(Array *a, double d)
Constructor from multiplying an array.
std::vector< std::string > symbols
Representation of string array.
std::vector< double > data
Representation of double array.
static Array * Divide(Array *a, double d)
Constructor from dividing an array.
static Array * Add(Array *a1, Array *a2)
Constructor from adding 2 double arrays.
double Product(Array *a)
Scalar vector product.
Array()
Default Constructor.
Common header for the lexer and the parser to share Symbol table for numeric variables,...
std::list< double > array
data
Parser namespace for GMAD language. Combination of Geant4 and MAD.