本文整理汇总了C++中MyMatrix::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ MyMatrix::getValue方法的具体用法?C++ MyMatrix::getValue怎么用?C++ MyMatrix::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyMatrix
的用法示例。
在下文中一共展示了MyMatrix::getValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sqrt
void * Chi2Lib::computeDifferenceThread( void* ptr){
PartitionDiff *part = (PartitionDiff*) ptr;
MyMatrix<double> *img = part->img;
MyMatrix<double> *grid_x = part->grid_x;
MyMatrix<double> *grid_y = part->grid_y;
double d = part->d;
double w = part->w;
MyMatrix<double> *diffout = part->diffout;
MyLogger::log()->debug("[Chi2Lib][computeDifferenceThread] Computing Chi2 Difference");
double chi2err = 0.0;
for(unsigned int x=part->x1; x < part->x2; ++x){
for(unsigned int y=part->y1; y < part->y2; ++y){
double x2y2 = sqrt(1.0*grid_x->getValue(x,y)*grid_x->getValue(x,y) + 1.0*grid_y->getValue(x,y)*grid_y->getValue(x,y));
double temp = ((1.0-tanh( (x2y2-d/2.0)/w )) - 2.0*img->getValue(x,y))/2.0;
diffout->at(x,y) = temp;
chi2err += temp*temp;
}
}
MyLogger::log()->debug("[Chi2Lib][computeDifferenceThread] Chi2 Error: %f", chi2err);
part->err = chi2err;
return 0;
}