Commit 7cc3e89d by xiaotong

fix a bug in XLink::MakeLink

parent 906eebb7
......@@ -321,7 +321,7 @@ void XLink::MakeLink(const XList * list, XTensor * h, int id)
continue;
XLink &outgo = t->outgo;
CheckNTErrors(outgo.head == NULL || outgo.head == t,
"Wrong head of the hyperedge!");
"Wrong head of the hyperedge!");
outgo.SetHead(t);
outgo.AddTail(h);
}
......@@ -349,6 +349,7 @@ void XLink::MakeLink(XTensor * t, XList * list, int id)
/* backward */
XLink &outgo = t->outgo;
outgo.SetHead(t);
CheckNTErrors(outgo.head == NULL || outgo.head == t, "Wrong head of the hyperedge!");
for(int i = 0; i < list->count; i++){
XTensor * t = (XTensor*)list->GetItem(i);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论