c++ 的这段摘录是什么?意思是?
我只是想了解 dX()
或 dY()
所引用的内容,
Table2D<double> grad2(const Table2D<double>& intensity) {
return grad2(intensity, dX(), dY());
}
Table2D<double> grad2(
const Table2D<double>& intensity,
const Kernel2D<double>& dX,
const Kernel2D<double>& dY)
{
Assert(
dX.getWidth() <= intensity.getWidth()
&& dX.getHeight() <= intensity.getHeight(),
"kernel 'dX' is bigger than array 'intensity' (in grad2)");
Assert(!dX.isEmpty(), "kernel 'dX' is empty (in grad2)");
Table2D<double> Ix(intensity*dX), Iy(intensity*dY);
return ((Ix%=Ix)+=(Iy%=Iy));
}
我已经使用中的各种设置上下搜索了文档查找器窗口(区分大小写等...),我在任何地方都找不到名为 dX()
或 dY()
的函数。也没有使用命名空间,因此它必须引用同一文档中的某些内容,对吧?
I'm simply trying to understand what is being reffered to by dX()
or dY()
in
Table2D<double> grad2(const Table2D<double>& intensity) {
return grad2(intensity, dX(), dY());
}
Table2D<double> grad2(
const Table2D<double>& intensity,
const Kernel2D<double>& dX,
const Kernel2D<double>& dY)
{
Assert(
dX.getWidth() <= intensity.getWidth()
&& dX.getHeight() <= intensity.getHeight(),
"kernel 'dX' is bigger than array 'intensity' (in grad2)");
Assert(!dX.isEmpty(), "kernel 'dX' is empty (in grad2)");
Table2D<double> Ix(intensity*dX), Iy(intensity*dY);
return ((Ix%=Ix)+=(Iy%=Iy));
}
I have searched the document up and down with all sorts of settings in the finder window (case sensetive etc...) and I couldn't find a function with the name dX()
or dY()
anywhere. no namespace is being used either so it would have to reference something in the same document right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
dX 和 dY(很可能表示 X 和 Y 方向的偏导数)也可以在通过 #include 包含的任何文件中声明。最好的办法是在文件上运行预处理器并查看输出。对于 gcc,当您调用编译器时,
您可以像这样调用预处理器:
查看预处理器的输出并找到 dX/dY 的声明。
dX and dY (most probably denoting the partial derivatives in X and Y direction) could also have been declared in any file that is included via #include. Your best bet is to run the preprocessor on your file and look at the output. For gcc, when you call your compiler like
you can call the preprocessor as
Look at the output of the preprocessor and find the declaration of dX/dY.