32 for(
double it : array->
array)
45 unsigned int size = std::min(a1->
data.size(),a2->
data.size());
47 for(
unsigned int i=0;i<size;i++)
56 unsigned int size = std::min(a1->
data.size(),a2->
data.size());
58 for(
unsigned int i=0;i<size;i++)
67 unsigned int size = a1->
data.size();
69 for(
unsigned int i=0;i<size;i++)
78 unsigned int size = a1->
data.size();
80 for(
unsigned int i=0;i<size;i++)
89 unsigned int size = a1->
data.size();
91 for(
unsigned int i=0;i<size;i++)
100 unsigned int size = a1->
data.size();
102 for(
unsigned int i=0;i<size;i++)
113 std::cerr <<
"ERROR: vector dimensions do not match" << std::endl;
118 for(
unsigned int i=0;i<
data.size();i++)
133 std::cout << d <<
" ";
135 std::cout << std::endl;
138 std::cout << s <<
" ";
140 std::cout << std::endl;
143std::list<std::string> Array::GetSymbolsList()
const
145 std::list<std::string> r;
146 for (
const std::string& s :
symbols)
151std::list<double> Array::GetDataList()
const
154 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.