这是一个语句。我认为它使用了类型转换操作符,但后缀递增运算符有什么作用呢?
(*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下无法构建(需要一堆外部库)。