Springhead
An open source physics engine for virtual reality, haptics and motion generation.
クラス テンプレート EVectorSlice< D >
EVectorSlice< D >に対する継承グラフ

Public 型

typedef const
ConstEVectorSlice< T > 
const_type
 
typedef void array_type
 
typedef void const_array_type
 
typedef VectorDesc
< EVectorSlice< T >, VVector
< T >, T > 
desc
 
typedef VectorImp< descbase_type
 
- Public 型 inherited from VectorImp< VectorDesc< EVectorSlice< T >, VVector< T >, T > >
typedef VectorDesc
< EVectorSlice< T >, VVector
< T >, T > 
desc
 
typedef TYPENAME desc::exp_type exp_type
 
typedef TYPENAME desc::ret_type ret_type
 
typedef TYPENAME desc::element_type element_type
 
typedef TYPENAME desc::zero zero
 

Public メソッド

 DEF_VECTOR_BASIC_MEMBER (EVectorSlice)
 継承されない基本的なメンバの定義. [詳細]
 
 EVectorSlice (size_t sz, size_t str, T *d)
 
 EVectorSlice (const EVectorSlice &v)
 
element_type & item_impl (size_t i)
 要素のアクセス
 
const element_type & item_impl (size_t i) const
 要素のアクセス
 
size_t size_impl () const
 サイズ
 
void resize_impl (size_t sz)
 サイズの設定
 
size_t stride_impl () const
 ストライド
 
- Public メソッド inherited from VectorImp< VectorDesc< EVectorSlice< T >, VVector< T >, T > >
 VectorImp ()
 コンストラクタ
 
exp_type & exp ()
 実体の取得
 
const exp_type & exp () const
 
const element_type & item (size_t n) const
 n番目の要素を返す(基数は0).
 
element_type & item (size_t n)
 
size_t size () const
 サイズの取得
 
void resize (size_t sz)
 サイズの設定
 
void resize (size_t sz, const element_type v)
 サイズの設定とベクトルの要素を全てvにする
 
size_t stride () const
 ストライドの取得
 
TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (SZ)
 スライスを返す.テンプレート版 このベクトルのSZ::OFFSET要素から SZ::OFFSET + SZ::SIZE要素までの 部分ベクトルへの参照を返す. [詳細]
 
const TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (SZ) const
 
TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (size_t off, SZ)
 スライスを返す.サイズだけテンプレート版 このベクトルの off 要素から off + SZ::SIZE要素までの 部分ベクトルへの参照を返す. [詳細]
 
const TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (size_t off, SZ) const
 
TSubVector< SZ::SIZE, desc > & sub_vector (SZ)
 部分ベクトルを返す.テンプレート版
 
const TSubVector< SZ::SIZE,
desc > & 
sub_vector (SZ) const
 
TSubVector< SZ::SIZE, desc > & sub_vector (size_t off, SZ)
 部分ベクトルを返す.サイズだけテンプレート版
 
const TSubVector< SZ::SIZE,
desc > & 
sub_vector (size_t off, SZ) const
 
EVectorSlice< element_type > v_range (size_t off, size_t sz)
 部分ベクトルを返す.変数版
 
ConstEVectorSlice< element_type > v_range (size_t off, size_t sz) const
 
EVectorSlice< element_type > v_slice (size_t off, size_t sz, size_t str)
 ベクトルのスライスを返す.
 
ConstEVectorSlice< element_type > v_slice (size_t off, size_t sz, size_t str) const
 
void clear (const element_type v=zero(0))
 ベクトルの要素を全てvにする. [詳細]
 
void assign (const VectorImp< B > &b)
 代入(*this = b). [詳細]
 
void assign (const element_type *b)
 代入(*this = b). [詳細]
 
void add (const VectorImp< B > &b)
 加算(*this += b). [詳細]
 
void sub (const VectorImp< B > &b)
 減算(*this -= b). [詳細]
 
void multi (const element_type &b)
 定数倍(*this *= b). [詳細]
 
void div (const element_type &b)
 定数分の1(*this /= b). [詳細]
 
element_type dot (const VectorImp< B > &b) const
 内積(return *this * b). [詳細]
 
bool equal (const VectorImp< B > &b) const
 比較(return *this == b). [詳細]
 
void element_min (const VectorImp< B > &b)
 要素ごとの最小値(min(*this, b)). [詳細]
 
void element_max (const VectorImp< B > &b)
 要素ごとの最大値(max(*this, b)). [詳細]
 
element_type square () const
 ベクトルのノルム(大きさ)の2乗を返す.
 
element_type norm () const
 ベクトルのノルム(大きさ)を返す.
 
void unitize ()
 単位ベクトルにする.
 
void clip (const VectorImp< BD > &b, const VectorImp< ED > &e)
 クリッピングする(bとeを頂点とする矩形内に収まるようにする).
 
void print (std::ostream &os, const char *sep="( )") const
 表示. [詳細]
 
void input (T &is)
 表示. [詳細]
 
element_type & operator[] (I n)
 [] 演算子(基数は0).
 
const element_type & operator[] (I n) const
 [] 演算子(基数は0) (const 版).
 
 operator element_type * ()
 element_type * への変換
 
 operator const element_type * () const
 
ret_type operator* (element_type b) const
 ベクトルのスカラー倍(return this * b). [詳細]
 
ret_type operator/ (element_type b) const
 ベクトルのスカラー分の1(return this / b). [詳細]
 
ret_type operator+= (const VectorImp< BD > &b)
 += 演算子(*this = *this + b). [詳細]
 
ret_type operator-= (const VectorImp< BD > &b)
 -= 演算子(*this = *this - b) [詳細]
 
ret_type operator*= (T b)
 *= 演算子 (*this = *this * b) [詳細]
 
ret_type operator/= (T b)
 /= 演算子 (*this = 1/b * *this). [詳細]
 
ret_type operator- () const
 
ret_type unit () const
 単位ベクトルを返す.
 

Protected メソッド

size_t index (size_t i) const
 元の行列へのアクセス
 
- Protected メソッド inherited from VectorImp< VectorDesc< EVectorSlice< T >, VVector< T >, T > >
void init_buffer ()
 バッファの初期化.何もしない.
 
void set_default ()
 デフォルトコンストラクタ
 

Protected 変数

element_type * data
 
size_t size_
 
size_t stride_
 

関数

DEF_VECTOR_BASIC_MEMBER ( EVectorSlice< D >  )

このクラスの説明は次のファイルから生成されました: