Changeset 519eaf5 for src/dgp/sgraph.cc


Ignore:
Timestamp:
03/30/14 23:59:06 (11 years ago)
Author:
Tomasz Obrebski <obrebski@…>
Branches:
master
Children:
0a58b3f
Parents:
f924e4b
git-author:
Tomasz Obrebski <obrebski@…> (03/30/14 23:59:06)
git-committer:
Tomasz Obrebski <obrebski@…> (03/30/14 23:59:06)
Message:

Bug fixes: bubbles,props

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/dgp/sgraph.cc

    rb97a556 r519eaf5  
    2929 
    3030  newnode.edge.push_back(lastnodeind()); 
     31 
     32  newnode.edge_contains_self = true ; 
    3133 
    3234  return lastnodeind(); 
     
    8587//---------------------------------------------------------------------------------------------------- 
    8688 
    87 void SGraph::print_arc(FILE* f, int head, int dep, Role role, int dir) // 0 - left, 1 - right 
     89void SGraph::print_arc(FILE* f, const char* msg, int head, int dep, Role role, int dir) // 0 - left, 1 - right 
    8890{ 
    8991  if(dir==0) 
    90     fprintf(f,"#A  %s:%d <-- %d\n", role.str(), dep, head); 
     92    fprintf(f,"%s  %s:%d <-- %d\n", msg, role.str(), dep, head); 
    9193  else 
    92     fprintf(f,"#A  %s:%d --> %d\n", role.str(), head, dep); 
     94    fprintf(f,"%s  %s:%d --> %d\n", msg, role.str(), head, dep); 
    9395} 
    9496 
     
    113115    for(vector<Arc>::iterator h=node.heads.begin(); h!=node.heads.end(); ++h) 
    114116    { 
    115       // if(cont) buf+=sprintf(buf,","); else cont=true; 
    116117      buf+=sprintf(buf,"(++%s:%d)",h->role.str(),h->dst); 
    117       // buf+=sprintf(buf,"++%s-%d(%d~%d)",h->role.str(),h->dst,h->headanc,h->depanc); 
    118       // buf+=sprintf(buf,"(<-%s-%d)",h->role.str(),h->dst); 
    119118    } 
    120119 
     
    122121    for(vector<Arc>::iterator d=node.deps.begin(); d!=node.deps.end(); ++d) 
    123122    { 
    124       //      if(! nodes[d->dst].saturated()) continue; // NIE DRUKUJ NIENASYCONYCH PODRZEDNIKOW 
    125       // if(cont) buf+=sprintf(buf,","); else cont=true; 
    126123      buf+=sprintf(buf,"(--%s:%d)",d->role.str(),d->dst); 
    127       // buf+=sprintf(buf,"--%s-%d(%d~%d)",d->role.str(),d->dst,d->headanc,d->depanc); 
    128       // buf+=sprintf(buf,"(-%s->%d)",d->role.str(),d->dst); 
    129124    } 
    130125   
     
    177172{ 
    178173  char *buf0 = buf; 
    179   buf+=sprintf(buf,"#%s",pref); 
    180  
    181   buf+=sprintf(buf,"%-16s",form(n)); 
    182  
     174  buf+=sprintf(buf,"%-10s",pref); 
     175  buf+=sprintf(buf,"%d.%s",n,form(n)); 
     176  buf+=sprintf(buf,";"); 
     177  buf+=sprintf(buf,"%s ",cat(n).str()); 
     178  while(buf-buf0<40) buf+=sprintf(buf," "); 
    183179  buf+=sprint_node(buf,n,anc,HEADS|DEPS|SETS|CONSTRAINTS); 
    184180   
    185   buf+=sprintf(buf,"/"); 
    186   for(vector<int>::iterator e = nodes[n].edge.begin(); e != nodes[n].edge.end(); e++ ) 
    187     buf += sprintf(buf,"%d ", *e); 
     181  // buf+=sprintf(buf,"/"); 
     182  // for(vector<int>::iterator e = nodes[n].edge.begin(); e != nodes[n].edge.end(); e++ ) 
     183  //   buf += sprintf(buf,"%d ", *e); 
    188184 
    189185  buf+=sprintf(buf,"\n"); 
Note: See TracChangeset for help on using the changeset viewer.