- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在使用 CodeSourcery 的 implementation vector 信号图像处理库 ( vsipl++ )。我写了一个函数,应该返回[I + a*A]^-1 B,其中I是单位矩阵,A和B是相容方阵,如下:
namespace vsipl {
template< class T1, class T2, class O1, class O2, class L1, class L2,
template< dimension_type, class, class, class > class B1,
template< dimension_type, class, class, class > class B2 >
Matrix< typename Promotion< T1, T2 >::type,
B1< 2, typename Promotion< T1, T2 >::type, O1, L1 > >
inv_mult( typename Promotion< T1, T2 >::type a,
Matrix< T1, B1< 2, T1, O1, L1 > > const& A,
Matrix< T2, B2< 2, T2, O2, L2 > > const& B
)
{
typedef typename Promotion< T1, T2 >::type value_type;
typedef Matrix< value_type, B1< 2, value_type, O1, L1 > > ret_type;
typedef lud< value_type, by_reference > lud_type;
ret_type ret(A.size(0),A.size(1),0), denom(A.size(0),A.size(1),0);
//I + a*A
denom.diag() = 1;
denom = denom + a*A;
lud_type ld( denom.size() );
ld.decompose( denom );
//as a side effect of using LAPACK as a back end, this requires a template
//param to indicate precisely what is being solved.
ld.solve< mat_ntrans >( B, ret ); // <--- Line generating error.
return ret;
}//inv_mult
}//vsipl
需要说明的是,在 vsipl++ 中,矩阵接受两个参数:一个类型和一个描述信息存储方式的 block 。该 block 是上面模板汤的原因。此外,lud 对象对矩阵 A 执行 LU 分解,然后使用 A 的分解形式求解 Ax = b。
当我尝试使用 gcc(MacOs 10.6 上的 4.2.1 和 Fedora 9 上的 4.3.0)编译它时,出现以下错误
error: no match for 'operator<' in 'ld.vsip::lud<T, by_reference>::solve [with
vsip::mat_op_type tr = tr, Block0 = Block0, Block1 = Block1, T = double] < mat_ntrans
我尝试通过消除 Promotion
类型来简化代码,需要单一数据和 block 类型,但我遇到了同样的错误。
有什么想法吗?
最佳答案
关于c++ - unable to determine cause of "no match for ' operator <'"编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3784035/
我很难找到正确的搜索语法:) 作为作业的一部分,我正在为 Android 开发一个国际象棋游戏。 我想使用按钮。 我画了棋盘,可以选择一个按钮(即我要移动的棋子)。 我可以点击一 block (按钮)
我有两个类,一个依赖于硬件,一个不依赖于硬件(我们分别称它们为 HardwareDependent 和 HardwareIndependent)。硬件相关类扩展了硬件独立类。现在我有另一个类,它至少必
在这里得到一个 Hibernate MappingException,我不知道为什么。 这是我得到的错误: 2014/01/13 23:58:38 [] ERROR GrailsContextLoad
我想了解 RODBC 如何确定新创建的 (Access) 表的列类型? sqlSave 的 R 文档非常神秘:“类型是通过咨询参数 varTypes 和 typeInfo 来选择的”。并且没有这个论点
我有一个具有定义高度的 div,并且 overflow:scroll; 。它的内容太长,因此出现滚动条。 现在是发痒的部分。它的一些内部 HTML 总是奇怪地出现(准确地说,是 tableFilter
场景 某些 SQL 代理作业计划全天每隔几分钟运行一次。 在某些情况下,它会错过下一个计划,因为它仍在按照上一个计划运行。 每隔一段时间,作业可能会“挂起”。这不会产生失败(因为作业尚未停止)。发生这
目前我使用这个解决方案来加载资源: URL url = MyClass.class.getClassLoader().getResource("documents/"+path); if(url ==
我正在尝试使用nRoomAllocationId在房间传输和房间部门映射类上实现多对一和一对多双向映射。 房间转移类 @Entity @Table(name="roomtransfer") publi
我有一个来自类的 print 方法: public void print(EditorPanePrinter epp) { try { PrinterJob pj=Printe
确定文件所在目录的好方法是什么?我会使用 realpath(),但这会返回符号链接(symbolic link)指向的文件或目录的绝对路径。 例如,如果参数是文件的基名,并且 lstat() 返回 0
我有一个名为 account 的抽象类,如下所示 - abstract class Account { private int number; private String owner
我一直在编写一个打开 Firebird 数据库的小型 Python 应用程序。 为了实现此目标,我使用嵌入的 Firebird 2.5.7.27050,64 位。 尽管如此,无论何时我尝试使用 Pyt
我有一个非常有趣的(至少对我而言)问题要解决(而且,不,这不是家庭作业)。它等同于:您需要确定用户在他的计算机前进行的“ session ”和“ session 开始和结束时间”。 您将获得进行任何用
从 iOS8 开始,您需要注册并提示用户使用本地通知。因此,我想实现一种方法来仔细检查这些权限。 如何检查本地通知设置是否未确定/未设置?到目前为止,我只知道如何检查本地通知是否被granted 或d
在我的应用程序中,我使用 Google In-app Billing Version 3 API 实现应用内购买。在我的应用程序的日志中,我看到: D/Finsky (26024): [1204]
我的小部件有几个 ImageButtons,为它们设置 onClicked 事件,我使用 PendingIntent: Intent intent = new Intent(context, Upda
推送到 github 工作正常。我认为当我从 github checkout 一个分支时,这个问题就开始了。我该如何解决?当我现在尝试推送到 github 时,出现错误“无法确定当前分支。” 此外,我
我正在尝试使用表数据导入向导工具将一个 csv 文件导入到我的数据库中,导入到只有一个属性(它的 ID VARCHAR(10))的表中,导入失败并向我显示此错误:error我检查了 csv 文件以查找
我正在尝试将一些随机生成的数字“合并”在我之前拥有的值向量中的相邻值之间定义的间隔之间。所以基本上,我有以下几点: vectorA包含从 101 到 0 的 101 个值。 我生成一个名为 x 的随机
我要执行一个脚本file.R使用 Rscript .在 file.R ,我使用包dplyr . # file.R df outputFile.Rout 2>&1 但是,如果我添加 default-p
我是一名优秀的程序员,十分优秀!