49 #include "DenseLinAlgPack_Types.hpp"
50 #include "Teuchos_Assert.hpp"
52 namespace DenseLinAlgPack {
57 class IVector :
public std::valarray<DenseLinAlgPack::size_type> {
61 typedef DenseLinAlgPack::index_type value_type;
62 typedef DenseLinAlgPack::size_type size_type;
63 typedef value_type& reference;
64 typedef const value_type& const_reference;
65 typedef value_type* iterator;
66 typedef const value_type* const_iterator;
67 typedef std::valarray<size_type> valarray;
76 IVector(
const value_type& val, size_type n);
78 IVector(
const value_type* p, size_type n);
91 const_iterator
begin()
const;
95 const_iterator
end()
const;
107 inline IVector::IVector(
const value_type& val, size_type n) : std::valarray<size_type>(val,n)
115 this->resize(iv.size());
116 std::valarray<DenseLinAlgPack::size_type>::operator=(iv);
125 return operator[](i-1);
133 return const_cast<IVector*
>(
this)->
operator[](i-1);
137 {
return &operator[](0); }
140 {
return &(
const_cast<IVector*
>(
this)->
operator[](0)); }
143 {
return begin() + size(); }
146 {
return begin() + size(); }
iterator end()
STL iterator.
IVector & operator=(const IVector &)
Resize on assignment.
iterator begin()
STL iterator.
reference operator()(size_type i)
1-based element access (range checked if TEUCHOS_DEBUG is defined)
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)