これがステートメントです。これはキャスト演算子を使用していると思いますが、ポストインクリメントはどうなりますか?
(*C)(x_i,gi_tn,f)++;
の宣言と定義C
:
std::auto_ptr<conditional_density> C(new conditional_density());
conditional_density
クラスの宣言:
class conditional_density: public datmoConditionalDensity{
public:
static const double l_min, l_max, delta;
static double x_scale[X_COUNT]; // input log luminance scale
double *g_scale; // contrast scale
double *f_scale; // frequency scale
const double g_max;
double total;
int x_count, g_count, f_count; // Number of elements
double *C; // Conditional probability function
conditional_density( const float pix_per_deg = 30.f ) :
g_max( 0.7f ){
//Irrelevant to the question
}
double& operator()( int x, int g, int f )
{
assert( (x + g*x_count + f*x_count*g_count >= 0) && (x + g*x_count + f*x_count*g_count < x_count*g_count*f_count) );
return C[x + g*x_count + f*x_count*g_count];
}
};
親クラスdatmoConditionalDensity
は、仮想デストラクタのみを持っています。
コードをデバッグすることでこれに答えるのは簡単でしたが、このコードはWindowsではビルドされません(多数の外部ライブラリが必要です)。