16 : maxCtx(maxCtx1), maxComtLink(maxComtLink1),
39 if (ctx == 0)
return 0;
43 tbl[ctx].
cFlag =
false;
60 set<int>& comtLinks = *tbl[ctx].
comtLinks;
64 int *clnks =
new int[comtLinks.size()];
66 for (p = comtLinks.begin(); p != comtLinks.end(); p++) {
67 if (
clTbl[*p].rteSet->size() != 0)
return false;
91 if (cLnk == 0)
return false;
97 lt->registerComt(lnk,ctx);
99 if (rflg) tbl[ctx].
rtrLinks->insert(cLnk);
100 if (cflg) tbl[ctx].
coreLinks->insert(cLnk);
116 if (
clTbl[cLnk].rteSet->size() != 0)
return false;
121 lt->deregisterComt(
getLink(cLnk),ctx);
136 set<int>& rtrLinks = *tbl[ctx].
rtrLinks;
137 set<int>& coreLinks = *tbl[ctx].
coreLinks;
138 set<int>::iterator p;
139 for (p = rtrLinks.begin(); p != rtrLinks.end(); p++) {
143 for (p = coreLinks.begin(); p != coreLinks.end(); p++) {
149 if (plnk != 0 && !
isRtrLink(ctx,plnk))
return false;
153 if (plnk != 0 && !
isCoreLink(ctx,plnk))
return false;
157 if (n > 1)
return false;
159 if (n == 1 && !
isCoreLink(ctx,plnk))
return false;
196 set<int> comtLinks;
readLinks(in, comtLinks);
197 set<int> coreLinks;
readLinks(in, coreLinks);
202 if (ctx == 0)
return false;
205 set<int>::iterator p;
206 for (p = comtLinks.begin(); p != comtLinks.end(); p++) {
210 bool coreFlag = (coreLinks.find(lnk) != coreLinks.end());
211 if (coreFlag && !rtrFlag)
return false;
212 if (!
addLink(ctx,lnk,rtrFlag,coreFlag))
return false;
240 for (
int i = 1; i <= num; i++) {
242 cerr <<
"ComtreeTable::read: could not read "
243 << i <<
"-th comtree\n";
261 set<int>& comtLinks = *tbl[ctx].
comtLinks;
262 set<int>::iterator p = comtLinks.begin();
263 while (p != comtLinks.end()) {
265 if (p != comtLinks.end()) ss <<
",";
269 set<int>& coreLinks = *tbl[ctx].
coreLinks;
270 p = coreLinks.begin();
271 if (p == coreLinks.end()) ss <<
"0";
272 while (p != coreLinks.end()) {
274 if (p != coreLinks.end()) ss <<
",";
288 ss <<
"# comtree coreFlag pLink links"
289 <<
" coreLinks" << endl;