With this purpose in mind, ContainArray is designed to be convenient, portable, and free. Take a look at the class header and example program. Or, download the complete package in tarball format.
Features:
Vector<int> vecint(3);
Matrix<double> matdbl(3,2);
Tensor<string> tenstr(3,4,2);
vecint[1] = 7;
matdbl[0][1] = 7.0;
tenstr[1][3][1] = "seven";
tenstr(1,3,1) = "eight";
vecint.at(2) = 77;
matdbl = 77.7;
std::cout << vecint << std::endl;
std::cin >> vecint;
If you like this software, you might also want to try my Mersenne Twister random number generator and ConfigFile configuration file reader.
visits since 13 Mar 05.
|
|
Rick Wagner ( wagnerr@umich.edu ) 14 Mar 05 |