42 #ifndef TEUCHOS_ARRAY_H
43 #define TEUCHOS_ARRAY_H
50 #include "Teuchos_Assert.hpp"
52 #include "Teuchos_ArrayRCP.hpp"
53 #include "Teuchos_Tuple.hpp"
55 #include "Teuchos_Assert.hpp"
57 #if defined(HAVE_TEUCHOSCORE_CXX11) && defined(HAVE_TEUCHOS_ARRAY_BOUNDSCHECK) && defined(HAVE_TEUCHOS_THREAD_SAFE) && !defined(REMOVE_THREAD_PROTECTION_FOR_ARRAY)
59 #define USE_MUTEX_LOCK_FOR_ARRAY
72 template<
typename T>
class Array;
88 template<
typename T>
inline
96 template<
typename T>
inline
104 template<
typename T>
inline
112 template<
typename T>
inline
113 bool operator<( const Array<T> &a1,
const Array<T> &a2 );
120 template<
typename T>
inline
121 bool operator<=( const Array<T> &a1,
const Array<T> &a2 );
128 template<
typename T>
inline
136 template<
typename T>
inline
204 template<
typename T2>
208 template<
typename T2>
212 template<
typename T2>
216 template<
typename T2>
217 friend bool Teuchos::operator<( const Array<T2> &a1,
const Array<T2> &a2 );
220 template<
typename T2>
221 friend bool Teuchos::operator<=( const Array<T2> &a1,
const Array<T2> &a2 );
224 template<
typename T2>
228 template<
typename T2>
243 typedef typename std::vector<T>::pointer
pointer;
253 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
263 typedef typename std::vector<T>::iterator
iterator;
287 template<
typename InputIterator>
288 inline Array(InputIterator first, InputIterator last);
298 inline Array(std::initializer_list<T> list);
317 template<
typename InputIterator>
318 inline void assign(InputIterator first, InputIterator last);
344 inline bool empty()
const;
372 template<
typename InputIterator>
373 inline void insert(
iterator position, InputIterator first, InputIterator last);
396 inline void remove(
int i);
402 inline int length()
const;
405 inline std::string
toString()
const;
424 inline const T*
data()
const;
431 inline Array(
const std::vector<T> &v );
434 inline std::vector<T>
toVector()
const;
510 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
514 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
515 mutable std::mutex mutex_lock;
521 inline std::vector<T>& vec(
522 bool isStructureBeingModified =
false,
523 bool activeIter =
false
526 inline const std::vector<T>& vec()
const;
528 inline typename std::vector<T>::iterator
531 inline void assertIndex(
size_type i)
const;
533 inline void assertNotNull()
const;
546 if (
is_null(v) || !v->size() )
548 return arcpWithEmbeddedObjPostDestroy<T,RCP<Array<T> > >(
549 &(*v)[0], 0, v->size(),
563 if (
is_null(v) || !v->size() )
565 return arcpWithEmbeddedObjPostDestroy<const T,RCP<const Array<T> > >(
566 &(*v)[0], 0, v->size(),
621 std::ostream& operator<<(std::ostream& os, const Array<T>& array);
628 template<
typename T>
inline
629 int hashCode(
const Array<T>& array);
638 template<
typename T>
inline
639 std::vector<T> createVector(
const Array<T> &a );
647 std::string toString(
const Array<T>& array);
702 Array<T> fromStringToArray(
const std::string& arrayStr);
710 std::istringstream& operator>> (std::istringstream& in,
Array<T>& array){
711 array = fromStringToArray<T>(in.str());
720 template<
typename T>
inline
775 static std::string name(){
776 std::string formatString = getArrayTypeNameTraitsFormat();
777 size_t starPos = formatString.find(
"*");
778 std::string prefix = formatString.substr(0,starPos);
779 std::string postFix = formatString.substr(starPos+1);
782 static std::string concreteName(
const Array<T>&)
801 template<
typename T>
inline
803 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
804 : vec_(
rcp(
new std::vector<T>()))
809 template<
typename T>
inline
811 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
812 vec_(
rcp(new std::vector<T>(n,value)))
819 template<
typename T>
inline
821 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
822 vec_(
rcp(new std::vector<T>(*x.vec_)))
829 template<
typename T>
template<
typename InputIterator>
inline
831 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
832 vec_(
rcp(new std::vector<T>(first, last)))
839 template<
typename T>
inline
844 template<
typename T>
inline
846 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
847 : vec_(
rcp(
new std::vector<T>()))
850 insert(begin(), a.begin(), a.end());
858 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
859 : vec_(
rcp(
new std::vector<T>()))
862 insert(begin(), t.
begin(), t.
end());
865 template<
typename T>
inline
867 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
868 : vec_(
rcp(
new std::vector<T>(a)))
874 template<
typename T>
inline
877 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
878 std::lock_guard<std::mutex> lockGuard(mutex_lock);
888 template<
typename T>
inline
891 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
892 std::lock_guard<std::mutex> lockGuard(mutex_lock);
894 vec(
true).assign(n,val);
898 template<
typename T>
template<
typename InputIterator>
inline
901 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
902 std::lock_guard<std::mutex> lockGuard(mutex_lock);
904 vec(
true).assign(first,last);
908 template<
typename T>
inline
912 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
914 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
915 std::lock_guard<std::mutex> lockGuard(mutex_lock);
920 extern_arcp_ = arcp(vec_);
925 return extern_arcp_.create_weak();
927 return vec().begin();
932 template<
typename T>
inline
936 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
937 return begin() + size();
943 template<
typename T>
inline
947 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
949 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
950 std::lock_guard<std::mutex> lockGuard(mutex_lock);
960 extern_arcp_ = arcp(vec_);
964 extern_carcp_ = extern_arcp_.create_weak();
969 return extern_carcp_.create_weak();
971 return vec().begin();
976 template<
typename T>
inline
980 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
981 return begin() + size();
988 template<
typename T>
inline
992 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
995 return vec().rbegin();
1000 template<
typename T>
inline
1004 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1007 return vec().rend();
1012 template<
typename T>
inline
1016 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1019 return vec().rbegin();
1024 template<
typename T>
inline
1028 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1031 return vec().rend();
1036 template<
typename T>
inline
1040 return vec().size();
1044 template<
typename T>
inline
1048 return std::numeric_limits<size_type>::max();
1052 template<
typename T>
inline
1056 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1057 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1059 vec(
true).resize(new_size,x);
1063 template<
typename T>
inline
1067 return vec().capacity();
1071 template<
typename T>
inline
1074 return vec().empty();
1078 template<
typename T>
inline
1081 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1082 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1084 vec(
true).reserve(n);
1088 template<
typename T>
inline
1092 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1099 template<
typename T>
inline
1103 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1110 template<
typename T>
inline
1114 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1121 template<
typename T>
inline
1125 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1132 template<
typename T>
inline
1136 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1139 return vec().front();
1143 template<
typename T>
inline
1147 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1150 return vec().front();
1154 template<
typename T>
inline
1158 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1161 return vec().back();
1165 template<
typename T>
inline
1169 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1172 return vec().back();
1176 template<
typename T>
inline
1179 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1180 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1182 vec(
true).push_back(x);
1186 template<
typename T>
inline
1189 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1192 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1193 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1195 vec(
true).pop_back();
1211 template<
typename T>
inline
1215 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1217 const typename std::vector<T>::iterator raw_poss = raw_position(position);
1219 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1221 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1223 vec(
true,
true).insert(raw_poss, x);
1224 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1229 return vec_.insert(position, x);
1234 template<
typename T>
inline
1237 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1238 const typename std::vector<T>::iterator raw_poss = raw_position(position);
1239 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1240 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1242 vec(
true,
true).insert(raw_poss, n, x);
1244 vec_.insert(position, n, x);
1249 template<
typename T>
template<
typename InputIterator>
inline
1252 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1253 const typename std::vector<T>::iterator raw_poss = raw_position(position);
1254 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1255 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1257 vec(
true,
true).insert(raw_poss, first, last);
1259 vec_.insert(position, first, last);
1264 template<
typename T>
inline
1268 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1271 const typename std::vector<T>::iterator raw_poss = raw_position(position);
1273 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1275 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1277 vec(
true,
true).erase(raw_poss);
1278 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1283 return vec_.erase(position);
1288 template<
typename T>
inline
1292 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1300 const typename std::vector<T>::iterator raw_first = raw_position(first);
1301 const typename std::vector<T>::iterator raw_last = raw_position(last);
1303 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1305 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1307 vec(
true,
true).erase(raw_first,raw_last);
1308 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1313 return vec_.erase(first,last);
1318 template<
typename T>
inline
1321 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1322 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1324 vec(
true).swap(x.vec());
1328 template<
typename T>
inline
1331 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1332 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1341 template<
typename T>
inline
1349 template<
typename T>
inline
1352 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1356 this->erase( this->begin() + i );
1360 template<
typename T>
inline
1363 return static_cast<int> (this->size ());
1367 template<
typename T>
inline
1370 return (*
this)().toString();
1374 template<
typename T>
inline
1377 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1385 template<
typename T>
inline
1388 return ( size() ? &(*
this)[0] :
nullptr );
1391 template<
typename T>
inline
1394 return ( size() ? &(*
this)[0] :
nullptr );
1397 template<
typename T>
inline
1400 return ( size() ? &(*
this)[0] :
nullptr );
1403 template<
typename T>
inline
1406 return ( size() ? &(*
this)[0] :
nullptr );
1412 template<
typename T>
inline
1414 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1415 vec_(new std::vector<T>(v))
1422 template<
typename T>
inline
1426 return std::vector<T>();
1427 std::vector<T> v(begin(),end());
1432 template<
typename T>
inline
1435 #ifdef USE_MUTEX_LOCK_FOR_ARRAY
1436 std::lock_guard<std::mutex> lockGuard(mutex_lock);
1446 template<
typename T>
inline
1450 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1451 return ArrayView<T>(this->begin().persistingView(offset, size_in));
1453 return arrayView( &vec()[offset], size_in );
1456 return Teuchos::null;
1460 template<
typename T>
inline
1464 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1467 return arrayView( &vec()[offset], size_in );
1470 return Teuchos::null;
1477 template<
typename T>
inline
1480 return view(offset, size_in);
1484 template<
typename T>
inline
1487 return view(offset, size_in);
1491 template<
typename T>
inline
1496 return this->view(0, size());
1500 template<
typename T>
inline
1505 return this->view(0, size());
1509 template<
typename T>
inline
1512 return this->operator()();
1516 template<
typename T>
inline
1519 return this->operator()();
1526 template<
typename T>
1528 Array<T>::vec(
bool isStructureBeingModified,
bool activeIter )
1530 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1532 if (isStructureBeingModified) {
1540 extern_arcp_ = null;
1541 extern_carcp_ = null;
1546 (void)isStructureBeingModified;
1553 template<
typename T>
inline
1554 const std::vector<T>&
1555 Array<T>::vec()
const
1557 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1565 template<
typename T>
inline
1566 typename std::vector<T>::iterator
1567 Array<T>::raw_position( iterator position )
1569 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
1570 const iterator first = this->begin();
1571 const iterator last = this->end();
1573 !(first <= position && position <= last), DanglingReferenceError,
1574 "Error, this iterator is no longer valid for this Aray!"
1579 return vec_->begin() + (position - this->begin());
1586 template<
typename T>
inline
1587 void Array<T>::assertIndex(size_type i)
const
1590 !( 0 <= i && i < size() ), RangeError,
1591 "Array<T>::assertIndex(i): i="<<i<<
" out of range [0, "<< size() <<
")"
1596 template<
typename T>
inline
1597 void Array<T>::assertNotNull()
const
1600 !size(), NullReferenceError,
1601 typeName(*
this)<<
"::assertNotNull(): "
1602 "Error, the array has size zero!"
1613 template<
typename T>
inline
1614 bool Teuchos::operator==(
const Array<T> &a1,
const Array<T> &a2 )
1615 {
return (a1.vec() == a2.vec()); }
1618 template<
typename T>
inline
1619 bool Teuchos::operator!=(
const Array<T> &a1,
const Array<T> &a2 )
1620 {
return (a1.vec() != a2.vec()); }
1623 template<
typename T>
inline
1624 void Teuchos::swap( Array<T> &a1, Array<T> &a2 )
1628 template<
typename T>
inline
1629 bool Teuchos::operator<( const Array<T> &a1,
const Array<T> &a2 )
1630 {
return (a1.vec() < a2.vec()); }
1633 template<
typename T>
inline
1634 bool Teuchos::operator<=( const Array<T> &a1,
const Array<T> &a2 )
1635 {
return (a1.vec() <= a2.vec()); }
1638 template<
typename T>
inline
1639 bool Teuchos::operator>(
const Array<T> &a1,
const Array<T> &a2 )
1640 {
return (a1.vec() > a2.vec()); }
1643 template<
typename T>
inline
1644 bool Teuchos::operator>=(
const Array<T> &a1,
const Array<T> &a2 )
1645 {
return (a1.vec() >= a2.vec()); }
1648 template<
typename T>
inline
1649 std::ostream& Teuchos::operator<<(
1650 std::ostream& os,
const Array<T>& array
1653 return os << Teuchos::toString(array);
1657 template<
typename T>
inline
1658 int Teuchos::hashCode(
const Array<T>& array)
1660 int rtn =
hashCode(array.length());
1661 for (
int i=0; i<array.length(); i++)
1670 size_t maxIntBeforeWrap = std::numeric_limits<int>::max();
1671 maxIntBeforeWrap ++;
1672 rtn += maxIntBeforeWrap;
1678 template<
typename T>
inline
1679 std::vector<T> Teuchos::createVector(
const Array<T> &a )
1681 return a.toVector();
1685 template<
typename T>
inline
1686 std::string Teuchos::toString(
const Array<T>& array)
1688 return array.toString();
1692 template<
typename T>
1694 Teuchos::fromStringToArray(
const std::string& arrayStr)
1696 const std::string str = Utils::trimWhiteSpace(arrayStr);
1697 std::istringstream iss(str);
1699 ( str[0]!=
'{' || str[str.length()-1] !=
'}' )
1700 ,InvalidArrayStringRepresentation
1701 ,
"Error, the std::string:\n"
1705 "is not a valid array represntation!"
1712 while( !iss.eof() ) {
1714 std::string entryStr;
1715 std::getline(iss,entryStr,
',');
1724 entryStr = Utils::trimWhiteSpace(entryStr);
1726 0 == entryStr.length(),
1727 InvalidArrayStringRepresentation,
1728 "Error, the std::string:\n"
1732 "is not a valid array represntation because it has an empty array entry!"
1736 bool found_end =
false;
1737 if(entryStr[entryStr.length()-1]==
'}') {
1738 entryStr = entryStr.substr(0,entryStr.length()-1);
1740 if( entryStr.length()==0 && a.size()==0 )
1744 std::istringstream entryiss(entryStr);
1746 Teuchos::extractDataFromISS( entryiss, entry );
1755 found_end && !iss.eof()
1756 ,InvalidArrayStringRepresentation
1757 ,
"Error, the std::string:\n"
1761 "is not a valid array represntation!"
1768 #endif // TEUCHOS_ARRAY_H
void remove(int i)
Remove the i-th element from the array, with optional boundschecking.
void reserve(size_type n)
int hashCode(const Array< T > &array)
Return the hash code.
Array< T > & append(const T &x)
Add a new entry at the end of the array.
Partial specialization of ArrayRCP for const T.
static bool hasBoundsChecking()
Return true if Array has been compiled with boundschecking on.
iterator begin() const
Return an iterator to beginning of the array of data.
ArrayView< T > view(size_type offset, size_type size)
Return non-const view of a contiguous range of elements.
bool is_null(const std::shared_ptr< T > &p)
Returns true if p.get()==NULL.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
std::vector< T >::value_type value_type
The type of an entry of the Array; for compatibility with std::vector.
void extractDataFromISS(std::istringstream &iss, std::string &data)
Extracts std::string data from an istringstream object.
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
iterator erase(iterator position)
ArrayRCP< T > arcp(const RCP< Array< T > > &v)
Wrap an RCP<Array<T> > object as an ArrayRCP<T> object.
Array & operator=(const Array< T > &a)
Assignment operator (does a deep copy).
T * getRawPtr()
Return a raw pointer to beginning of array or NULL if unsized.
std::vector< T >::const_pointer const_pointer
The type of a const pointer to T; for compatibility with std::vector.
ArrayRCP< T > arcpFromArray(Array< T > &a)
Wrap an Array<T> object as a non-owning ArrayRCP<T> object.
ArrayRCP< const T > arcp(const RCP< const Array< T > > &v)
Wrap a RCP<const Array<T> > object as an ArrayRCP<const T> object.
static std::string trimWhiteSpace(const std::string &str)
Trim whitespace from beginning and end of std::string.
Statically sized simple array (tuple) class.
Ordinal size_type
The type of Array sizes and capacities.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Ordinal difference_type
The type of the difference between two size_type values.
std::string toString() const
Convert an Array to an std::string
T * data()
Return a raw pointer to beginning of array.
ArrayRCP< const T > arcpFromArray(const Array< T > &a)
Wrap a const Array<T> object as a non-owning ArrayRCP<T> object.
std::string getArrayTypeNameTraitsFormat()
Get the format that is used for the specialization of the TypeName traits class for Array...
friend void swap(Array< T2 > &a1, Array< T2 > &a2)
void resize(size_type new_size, const value_type &x=value_type())
Teuchos_Ordinal Ordinal
The type of indices.
std::vector< T >::reference reference
The type of a reference to T; for compatibility with std::vector.
std::vector< T >::pointer pointer
The type of a pointer to T; for compatibility with std::vector.
std::vector< T >::const_iterator const_iterator
The type of a const forward iterator.
reverse_iterator rbegin()
std::vector< T >::const_reference const_reference
The type of a const reference to T; for compatibility with std::vector.
void push_back(const value_type &x)
Default traits class that just returns typeid(T).name().
void extractDataFromISS(std::istringstream &iss, T &data)
Extracts data from an istringstream object.
std::vector< T >::const_reverse_iterator const_reverse_iterator
The type of a const reverse iterator.
iterator end() const
Return an iterator to past the end of the array of data.
int length() const
Return number of elements in the array.
std::vector< T >::allocator_type allocator_type
The allocator type; for compatibility with std::vector.
std::vector< T > toVector() const
Explicit copy conversion to an std::vector.
ArrayView< T > operator()()
Return an non-const ArrayView of *this.
reference at(size_type i)
Smart reference counting pointer class for automatic garbage collection.
friend bool Teuchos::operator!=(const Array< T2 > &a1, const Array< T2 > &a2)
reference operator[](size_type i)
Partial specialization of ArrayView for const T.
#define TEUCHOS_ASSERT(assertion_test)
This macro is throws when an assert fails.
void assign(size_type n, const value_type &val)
Array()
Default constructor; creates an empty Array.
size_type max_size() const
std::vector< T >::iterator iterator
The type of a forward iterator.
A utilities class for Teuchos.
iterator insert(iterator position, const value_type &x)
Defines basic traits returning the name of a type in a portable and readable way. ...
std::vector< T >::reverse_iterator reverse_iterator
The type of a reverse iterator.
size_type capacity() const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call...
static std::string name()
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
Reference-counted smart pointer for managing arrays.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...