64 Array<int> oneDArray = tuple<int>(1,2,3,4,5,6);
75 std::string badStringRep =
"4x4:{1.0,1.0}";
93 std::istringstream instream(ss.str());
94 instream >> readArray;
117 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
131 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
A thin wrapper around the Teuchos Array class that allows for 2 dimensional arrays.
#define TEST_ASSERT(v1)
Assert the given statement is true.
const Array< T > & getDataArray() const
Returns the 1D array that is backing this TwoDArray.
void setSymmetrical(bool symmetrical)
Sets whether or not the the TwoDArray should be interpurted as symetric.
void clear()
delets all the entries from the TwoDArray
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails)...
static std::string toString(const TwoDArray< T > array)
Converts a given TwoDArray to a valid string representation.
TEUCHOS_UNIT_TEST(ConstNonconstObjectContainer, create)
A thin wrapper around the Array class which causes it to be interpreted as a 2D Array.
TwoDArray< int > getSimpleTestTwoDArray()
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
size_type getNumCols() const
returns the number of columns in the TwoDArray.
void resizeCols(size_type numberOfCols)
Changes the number of rows in the matrix.
void resizeRows(size_type numberOfRows)
Changes the number of rows in the matrix.
size_type getNumRows() const
returns the number of rows in the TwoDArray.
#define TEST_COMPARE_ARRAYS(a1, a2)
Assert that a1.size()==a2.size() and a[i]==b[i], i=0....
Range error exception class.
static TwoDArray< T > fromString(const std::string &string)
Converts a valid string to it's corresponding TwoDArray.
bool isSymmetrical() const
A simple flag indicating whether or not this TwoDArray should be interpurted as symmetrical.