32 #include <boost/shared_ptr.hpp>
34 #include "../common/math/WValue.h"
35 #include "../common/math/linearAlgebra/WLinearAlgebra.h"
36 #include "../common/WAssert.h"
37 #include "../common/WLimits.h"
38 #include "WDataHandlerEnums.h"
39 #include "WValueSetBase.h"
87 return *(
m_ptr + i *
static_cast< std::size_t
>( i <
m_size ) );
127 m_minimum = std::numeric_limits< T >::max();
128 m_maximum = std::numeric_limits< T >::min();
129 for(
typename std::vector< T >::const_iterator iter = data->begin(); iter != data->end(); ++iter )
149 m_minimum = std::numeric_limits< T >::max();
150 m_maximum = std::numeric_limits< T >::min();
151 for(
typename std::vector< T >::const_iterator iter = data->begin(); iter != data->end(); ++iter )
166 WAssert(
m_dimension == 1,
"Although order zero, (dimension != 1) was found." );
175 WAssert(
false,
"Unsupported tensor order." );
194 return (*
m_data.get())[i];
203 return static_cast< double >( (*
m_data.get())[i] );
250 return &(*
m_data.get())[0];
275 WAssert( start + size <=
rawSize(),
"" );
276 WAssert( size != 0,
"" );
327 const boost::shared_ptr< std::vector< T > >
m_data;
336 return WValueSetVariant(
this );
342 WAssert(
m_order == 1 &&
m_dimension == 3,
"WValueSet<T>::getVector3D only implemented for order==1, dim==3 value sets" );
343 WAssert( ( index + 1 ) * 3 <=
m_data->size(),
"index in WValueSet<T>::getVector3D too big" );
344 size_t offset = index * 3;
350 WAssert(
m_order == 1,
"WValueSet<T>::getWValue only implemented for order==1 value sets" );
351 WAssert( ( index + 1 ) * m_dimension <= m_data->
size(),
"index in WValueSet<T>::getWValue too big" );
359 result[i] = ( *
m_data )[offset+i];
364 template<
typename T >
369 for(
size_t v = 0; v < oder; ++v )
377 #endif // WVALUESET_H