30 #include <boost/shared_ptr.hpp>
32 #include "../common/math/WValue.h"
33 #include "../common/math/linearAlgebra/WLinearAlgebra.h"
34 #include "../common/WAssert.h"
35 #include "../common/WLimits.h"
36 #include "WDataHandlerEnums.h"
37 #include "WValueSetBase.h"
85 return *(
m_ptr + i *
static_cast< std::size_t
>( i <
m_size ) );
127 for(
typename std::vector< T >::const_iterator iter = data->begin(); iter != data->end(); ++iter )
142 WAssert(
m_dimension == 1,
"Although order zero, (dimension != 1) was found." );
151 WAssert(
false,
"Unsupported tensor order." );
170 return (*
m_data.get())[i];
179 return static_cast< double >( (*
m_data.get())[i] );
226 return &(*
m_data.get())[0];
251 WAssert( start + size <=
rawSize(),
"" );
252 WAssert( size != 0,
"" );
293 const boost::shared_ptr< std::vector< T > >
m_data;
302 return WValueSetVariant(
this );
308 WAssert(
m_order == 1 &&
m_dimension == 3,
"WValueSet<T>::getVector3D only implemented for order==1, dim==3 value sets" );
309 WAssert( ( index + 1 ) * 3 <=
m_data->size(),
"index in WValueSet<T>::getVector3D too big" );
310 size_t offset = index * 3;
316 WAssert(
m_order == 1,
"WValueSet<T>::getWValue only implemented for order==1 value sets" );
317 WAssert( ( index + 1 ) * m_dimension <= m_data->
size(),
"index in WValueSet<T>::getWValue too big" );
325 result[i] = ( *
m_data )[offset+i];
330 #endif // WVALUESET_H