Here's the statement. I believe this is using a cast operator, but what's the deal with the post increment?
(*C)(x_i,gi_tn,f)++;
Declaration and definition of C
:
std::auto_ptr<conditional_density> C(new conditional_density());
Declaration of the conditional_density
class:
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];
}
};
The parent class, datmoConditionalDensity
, only has a virtual destructor.
It would have been easy to answer this by debugging the code, but this code won't build under Windows (needs a bunch of external libraries).