Public 型 | Public メソッド | Protected 型 | Protected メソッド | Protected 変数
クラス テンプレート mist::buffered_array< Array >

1辺が2の指数乗のバッファを持った画像を作成する [詳細]

#include <mist.h>

Public 型

typedef Array::allocator_type allocator_type
 MISTコンテナが利用するアロケータ型
typedef Array::reference reference
 MISTのコンテナ内に格納するデータ型の参照.mist::array< data > の場合,data & となる
typedef Array::const_reference const_reference
 MISTのコンテナ内に格納するデータ型の const 参照.mist::array< data > の場合,const data & となる
typedef Array::value_type value_type
 MISTのコンテナ内に格納するデータ型.mist::array< data > の data と同じ
typedef Array::size_type size_type
 符号なしの整数を表す型.コンテナ内の要素数や,各要素を指定するときなどに利用し,内部的には size_t 型と同じ
typedef Array::difference_type difference_type
 符号付きの整数を表す型.コンテナ内の要素数や,各要素を指定するときなどに利用し,内部的には ptrdiff_t 型と同じ
typedef Array::pointer pointer
 MISTのコンテナ内に格納するデータ型のポインター型.mist::array< data > の場合,data * となる
typedef Array::const_pointer const_pointer
 MISTのコンテナ内に格納するデータ型の const ポインター型.mist::array< data > の場合,const data * となる
typedef Array::iterator iterator
 MISTのコンテナ内を操作する,STLで言う順方向のランダムアクセスイテレータ
typedef Array::const_iterator const_iterator
 MISTのコンテナ内を操作する,順方向のランダムアクセスイテレータのコンスト版
typedef Array::reverse_iterator reverse_iterator
 MISTのコンテナ内を操作する,逆方向のランダムアクセスイテレータ
typedef
Array::const_reverse_iterator 
const_reverse_iterator
 MISTのコンテナ内を操作する,逆方向のランダムアクセスイテレータのコンスト版

Public メソッド

bool resize (size_type num1)
 コンテナ内の要素数を変更する
bool resize (size_type num1, size_type num2)
 コンテナ内の要素数を変更する
bool resize (size_type num1, size_type num2, size_type num3)
 コンテナ内の要素数を変更する
bool swap (buffered_array &a)
 コンテナ内の全ての内容を入れ替える.
void clear ()
 コンテナの要素を空にする
size_type size1 () const
 X軸方向のコンテナに格納されているデータ数を返す
size_type size2 () const
 Y軸方向のコンテナに格納されているデータ数を返す
size_type size3 () const
 Z軸方向のコンテナに格納されているデータ数を返す
size_type width () const
 X軸方向のコンテナに格納されているデータ数を返す
size_type height () const
 Y軸方向のコンテナに格納されているデータ数を返す
size_type depth () const
 Z軸方向のコンテナに格納されているデータ数を返す
const buffered_arrayoperator= (const buffered_array &o)
 同じ型の buffered_array コンテナを代入する
template<class T , class Allocator >
const buffered_arrayoperator= (const array< T, Allocator > &o)
 要素の型が異なる array コンテナを代入する
template<class T , class Allocator >
const buffered_arrayoperator= (const array1< T, Allocator > &o)
 要素の型が異なる array1 コンテナを代入する
template<class T , class Allocator >
const buffered_arrayoperator= (const array2< T, Allocator > &o)
 要素の型が異なる array2 コンテナを代入する
template<class T , class Allocator >
const buffered_arrayoperator= (const array3< T, Allocator > &o)
 要素の型が異なる array3 コンテナを代入する
 buffered_array ()
 ディフォルトコンストラクタ.要素数 0 のコンテナを作成する
 buffered_array (const buffered_array &o)
 コピーコンストラクタ
template<class T , class Allocator >
 buffered_array (const array< T, Allocator > &o)
 array 配列 o を用いて初期化し,一辺の長さを2の指数乗にする
template<class T , class Allocator >
 buffered_array (const array1< T, Allocator > &o)
 array1 配列 o を用いて初期化し,一辺の長さを2の指数乗にする
template<class T , class Allocator >
 buffered_array (const array2< T, Allocator > &o)
 array2 配列 o を用いて初期化し,一辺の長さを2の指数乗にする
template<class T , class Allocator >
 buffered_array (const array3< T, Allocator > &o)
 array3 配列 o を用いて初期化し,一辺の長さを2の指数乗にする

Protected 型

typedef Array base
 基底クラス

Protected メソッド

size_t floor_square_index (size_t v)
 指定された数値以上の正整数で最も最小の2の指数乗を計算し,その指数部を返す
size_t floor_square (size_t v)
 指定された数値以上の正整数で最も最小の2の指数乗を計算する

Protected 変数

size_type size1_
 X軸方向の要素数
size_type size2_
 Y軸方向の要素数
size_type size3_
 Z軸方向の要素数

説明

template<class Array>
class mist::buffered_array< Array >

1辺が2の指数乗のバッファを持った画像を作成する

1・2・3次元画像の1辺が2の指数乗にするための基本クラス

引数
Array… 1・2・3次元画像クラスを指定する

関数

template<class Array >
void mist::buffered_array< Array >::clear ( )
inline

コンテナの要素を空にする

コンテナに格納されているデータを全て削除し,コンテナを空(要素数0)にする

template<class Array >
size_t mist::buffered_array< Array >::floor_square ( size_t  v)
inlineprotected

指定された数値以上の正整数で最も最小の2の指数乗を計算する

引数
[in]v… 任意の非負の整数
戻り値
入力された正整数を超える最も最小の2の指数乗を表す整数
template<class Array >
size_t mist::buffered_array< Array >::floor_square_index ( size_t  v)
inlineprotected

指定された数値以上の正整数で最も最小の2の指数乗を計算し,その指数部を返す

引数
[in]v… 任意の非負の整数
戻り値
入力された正整数を超える最も最小の2の指数乗の指数部
template<class Array >
const buffered_array& mist::buffered_array< Array >::operator= ( const buffered_array< Array > &  o)
inline

同じ型の buffered_array コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の buffered_array コンテナ
戻り値
自分自身

参照先 mist::buffered_array< Array >::size1_, mist::buffered_array< Array >::size2_, と mist::buffered_array< Array >::size3_.

template<class Array >
template<class T , class Allocator >
const buffered_array& mist::buffered_array< Array >::operator= ( const array< T, Allocator > &  o)
inline

要素の型が異なる array コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array コンテナ
戻り値
自分自身

参照先 mist::array< T, Allocator >::size().

template<class Array >
template<class T , class Allocator >
const buffered_array& mist::buffered_array< Array >::operator= ( const array1< T, Allocator > &  o)
inline

要素の型が異なる array1 コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array1 コンテナ
戻り値
自分自身

参照先 mist::array1< T, Allocator >::reso1(), と mist::array< T, Allocator >::size().

template<class Array >
template<class T , class Allocator >
const buffered_array& mist::buffered_array< Array >::operator= ( const array2< T, Allocator > &  o)
inline

要素の型が異なる array2 コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array2 コンテナ
戻り値
自分自身

参照先 mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array2< T, Allocator >::size1(), と mist::array2< T, Allocator >::size2().

template<class Array >
template<class T , class Allocator >
const buffered_array& mist::buffered_array< Array >::operator= ( const array3< T, Allocator > &  o)
inline

要素の型が異なる array3 コンテナを代入する

コピー元であるコンテナ o と全く同じコンテナを作成する. コピー先(ここでは自分自身)の要素数が o と異なる場合は,自動的にサイズを調整する.

引数
[in]o… コピー元の array3 コンテナ
戻り値
自分自身

参照先 mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array3< T, Allocator >::reso3(), mist::array3< T, Allocator >::size1(), mist::array3< T, Allocator >::size2(), と mist::array3< T, Allocator >::size3().

template<class Array >
bool mist::buffered_array< Array >::resize ( size_type  num1)
inline

コンテナ内の要素数を変更する

各軸の要素数が指定された整数以上で最小の2の指数乗に変更し,要素数が変更された場合のみ全ての要素をデフォルト値で初期化する.

注意
必ず要素を初期化するためには,fill 関数を利用してください.
引数
[in]num1… リサイズ後のX軸方向の要素数
template<class Array >
bool mist::buffered_array< Array >::resize ( size_type  num1,
size_type  num2 
)
inline

コンテナ内の要素数を変更する

各軸の要素数が指定された整数以上で最小の2の指数乗に変更し,要素数が変更された場合のみ全ての要素をデフォルト値で初期化する.

注意
必ず要素を初期化するためには,fill 関数を利用してください.
引数
[in]num1… リサイズ後のX軸方向の要素数
[in]num2… リサイズ後のY軸方向の要素数
template<class Array >
bool mist::buffered_array< Array >::resize ( size_type  num1,
size_type  num2,
size_type  num3 
)
inline

コンテナ内の要素数を変更する

各軸の要素数が指定された整数以上で最小の2の指数乗に変更し,要素数が変更された場合のみ全ての要素をデフォルト値で初期化する.

注意
必ず要素を初期化するためには,fill 関数を利用してください.
引数
[in]num1… リサイズ後のX軸方向の要素数
[in]num2… リサイズ後のY軸方向の要素数
[in]num3… リサイズ後のZ軸方向の要素数
template<class Array >
bool mist::buffered_array< Array >::swap ( buffered_array< Array > &  a)
inline

コンテナ内の全ての内容を入れ替える.

注意
どちらかのコンテナが外部メモリを利用している場合は,スワップは必ず失敗する

入れ替え元のコンテナ a の中身と全て入れ替える

引数
[in]a… 内容を入れ替える対象
戻り値
true… データのスワップに成功
false… データのスワップに失敗

参照先 mist::buffered_array< Array >::size1_, mist::buffered_array< Array >::size2_, と mist::buffered_array< Array >::size3_.


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

Generated on Wed Nov 12 2014 19:44:29 for MIST by doxygen 1.8.1.2