<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -359,7 +359,7 @@ void GraphState::print ( GSWalk* gsw, map&lt;Tid, int&gt; weightmap_a, map&lt;Tid, int&gt; w
   // convert occurrence lists to weight maps with initial weight 1
   for ( int i = 0; i &lt; (int) nodes.size (); i++ ) {
     set&lt;InputNodeLabel&gt; inl; inl.insert(fm::database-&gt;nodelabels[nodes[i].label].inputlabel);
-    gsw-&gt;nodewalk.push_back( (GSWNode) { inl, weightmap_a, weightmap_i, 0 } );
+    gsw-&gt;nodewalk.push_back( (GSWNode) { inl, weightmap_a, weightmap_i, 0, 0 } );
   }
 
   for ( int i = 0; i &lt; (int) nodes.size (); i++ ) {
@@ -367,7 +367,7 @@ void GraphState::print ( GSWalk* gsw, map&lt;Tid, int&gt; weightmap_a, map&lt;Tid, int&gt; w
       GraphState::GSEdge &amp;edge = nodes[i].edges[j];
       if ( i &lt; edge.tonode ) {
           set&lt;InputEdgeLabel&gt; iel; iel.insert((InputEdgeLabel) fm::database-&gt;edgelabels[fm::database-&gt;edgelabelsindexes[edge.edgelabel]].inputedgelabel);
-          gsw-&gt;edgewalk[i][edge.tonode] = (GSWEdge) { edge.tonode , iel, weightmap_a, weightmap_i, 0 } ;
+          gsw-&gt;edgewalk[i][edge.tonode] = (GSWEdge) { edge.tonode , iel, weightmap_a, weightmap_i, 0, 0 } ;
       }
     }
   }
@@ -1406,8 +1406,8 @@ int GSWalk::conflict_resolution (vector&lt;int&gt; core_ids, GSWalk* s, bool direction
                             map&lt;Tid, int&gt; weightmap_i; 
                             set&lt;InputNodeLabel&gt; inl;
                             set&lt;InputEdgeLabel&gt; iel;
-                            GSWNode n = { inl, weightmap_a, weightmap_i };
-                            GSWEdge e = { to-&gt;first, iel, weightmap_a, weightmap_i };
+                            GSWNode n = { inl, weightmap_a, weightmap_i, 0, 0 };
+                            GSWEdge e = { to-&gt;first, iel, weightmap_a, weightmap_i, 0, 0 };
                             s-&gt;add_edge(from-&gt;first, e, n, 0, &amp;core_ids, &amp;u12);
                         }
                     }
@@ -1518,8 +1518,8 @@ int GSWalk::conflict_resolution (vector&lt;int&gt; core_ids, GSWalk* s, bool direction
                             map&lt;Tid, int&gt; weightmap_i; 
                             set&lt;InputNodeLabel&gt; inl;
                             set&lt;InputEdgeLabel&gt; iel;
-                            GSWNode n = { inl, weightmap_a, weightmap_i };
-                            GSWEdge e = { *it, iel, weightmap_a, weightmap_i };
+                            GSWNode n = { inl, weightmap_a, weightmap_i, 0, 0 };
+                            GSWEdge e = { *it, iel, weightmap_a, weightmap_i, 0, 0 };
                             ninsert21[*it][j]=n;
                             einsert21[*it][j]=e;
                         }
@@ -1554,8 +1554,8 @@ int GSWalk::conflict_resolution (vector&lt;int&gt; core_ids, GSWalk* s, bool direction
                             map&lt;Tid, int&gt; weightmap_i; 
                             set&lt;InputNodeLabel&gt; inl;
                             set&lt;InputEdgeLabel&gt; iel;
-                            GSWNode n = { inl, weightmap_a, weightmap_i };
-                            GSWEdge e = { *it, iel, weightmap_a, weightmap_i };
+                            GSWNode n = { inl, weightmap_a, weightmap_i, 0, 1 };
+                            GSWEdge e = { *it, iel, weightmap_a, weightmap_i, 0, 1 };
                             ninsert12[*it][j]=n;
                             einsert12[*it][j]=e;
                         }</diff>
      <filename>graphstate.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -134,6 +134,8 @@ struct GSWNode {
     map&lt;Tid, int&gt; a;
     map&lt;Tid, int&gt; i;
     bool deleted;
+    bool optional;
+
     int stack(GSWNode n);
     friend ostream&amp; operator&lt;&lt; (ostream &amp;out, GSWNode* n);
 };
@@ -148,6 +150,8 @@ struct GSWEdge {
     map&lt;Tid, int&gt; a;
     map&lt;Tid, int&gt; i;
     bool deleted;
+    bool optional;
+
     int stack(GSWEdge e);
     static bool lt_to (GSWEdge&amp; e1, GSWEdge&amp; e2){
         if (e1.to &lt; e2.to) return 1;</diff>
      <filename>graphstate.h</filename>
    </modified>
    <modified>
      <diff>@@ -1112,7 +1112,10 @@ ostream&amp; operator&lt;&lt; (ostream&amp; os, GSWalk* gsw) {
             os &lt;&lt; &quot;}&quot;;
             //#endif*/
 
-            if (it2-&gt;second.deleted) os &lt;&lt; &quot; [D] &quot;;
+            if (it2-&gt;second.deleted || it2-&gt;second.optional) os &lt;&lt; &quot; [&quot;;
+            if (it2-&gt;second.optional) os &lt;&lt; &quot;O&quot;;
+            if (it2-&gt;second.deleted) os &lt;&lt; &quot;D&quot;;
+            if (it2-&gt;second.deleted || it2-&gt;second.optional) os &lt;&lt; &quot;] &quot;;
 
             os &lt;&lt; endl;
         }</diff>
      <filename>patterntree.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1f92630e30e704253c87627815db170f3d10f8b9</id>
    </parent>
  </parents>
  <author>
    <name>Andreas Maunz</name>
    <email>andreas@maunz.de</email>
  </author>
  <url>http://github.com/amaunz/last/commit/34180615813c0568b620d8c0aa11dda6cf791b67</url>
  <id>34180615813c0568b620d8c0aa11dda6cf791b67</id>
  <committed-date>2009-11-06T04:51:03-08:00</committed-date>
  <authored-date>2009-11-06T04:51:03-08:00</authored-date>
  <message>Added support for optional edges</message>
  <tree>6a1894519d1e8bef2d71344585db6658d2522d0e</tree>
  <committer>
    <name>Andreas Maunz</name>
    <email>andreas@maunz.de</email>
  </committer>
</commit>
