<divclass="textblock"><p>Structure managing one routing track. </p>
<h1><aclass="anchor"id="secTrackPurpose"></a>
Track Purpose</h1>
<p>We use an array of <em>regularly spaced</em><aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> as a geometrical fast access structure. It allows to know whether an area is used or not. The whole area may be seen as a set of adjoining tiles of fixed <em>width</em> but variable <em>length</em>.</p>
<p>The figure <b>(1.b)</b> show, for an horizontal, track the relation between <code>y,min,max</code> and the occupied area of the plane. <code>min</code> and <code>max</code> must take into account segment extensions (<code>e</code>) and the minimal distance between two rectangles (<code>MD</code>) of the same layer. We assume that the width of the segment, augmented of all it's contraints is no greater than <code>TS</code> (in fact it's how <code>TS</code> must be calculated).</p>
<p>For the whole track array, see <aclass="el"href="classKite_1_1RoutingPlane.html"title="Array of Tracks in one Layer. ">RoutingPlane</a>.</p>
<p>A <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> is implemented with a sorted vector of <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>. TrackElements from differents nets must not overlap. The sorting order is defined as follow:</p>
<li>TrackElements are sorted by increasing source (<em>min</em>) positions.</li>
<li>In case of overlap (i.e. belongs to the same net), if they share the same source position, then they are sorted by <em>decreasing</em> length. This way, the longest one will be the first encountered when walking through the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> in increasing index order.</li>
</ul>
<p>Figure <b>2.b</b> shows the details of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a><b>[1]</b> of figure <b>1.a</b>. Net <b><d></b> show an exemple of overlapping.</p>
<divclass="image">
<imgsrc="Track-1.png"alt="Track-1.png"/>
<divclass="caption">
Fig 2: Track Structure</div></div>
<p>In addition to the TrackSegments, the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> also manage additionnal informations through a second vector of TrackMarkers. <aclass="el"href="classKite_1_1TrackMarker.html"title="Tag part of Track with a weight. ">TrackMarker</a> are currently used only to hints at how strongly a terminal is dependant on that portion of <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> to be accessed.</p>
<h2><aclass="anchor"id="ssecTrackIndexes"></a>
Indexes vs. Iterators</h2>
<p>Numerical indexes have been prefered over iterators because they can be used more easily by objects other the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> itself for referencing. So internal managment follow the same rule, handling indexes or reference to indexes.</p>
<h2><aclass="anchor"id="ssecTrackUpdate"></a>
Update Mechanism</h2>
<p>When a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> is normaly inserted in a <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, a two way link is established. The <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> has an entry in it's vector refering to <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>, and conversely, the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> has it's <code>track</code> field pointing to it's owning <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>.</p>
<p><b><aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> Removal</b></p>
<p>To remove a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> from a <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, we break one of those two links: the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> cease to refer to the owning <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, marking him for removal which will occurs at the next track revalidation (<aclass="el"href="classKite_1_1Track.html#abfffcd781865b94f62f27a1e7be99a38">Track::doRemoval()</a>). In figure <b>3</b>, the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> belonging to net <b><b></b> is marked for removal.</p>
<divclass="image">
<imgsrc="Track-2.png"alt="Track-2.png"/>
<divclass="caption">
Fig 3: TrackElement Removal</div></div>
<p><b><aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> Insertion</b></p>
<p>When a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> is inserted into a <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, the two way link is immediatly created (but the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> is not yet at it's final place in the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>'s vector). Before inserting a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> we check that it's been already detached (<code>track</code> field to <code>NULL</code>).</p>
<p>It is at that step that the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> axis is actually updated through a call to <aclass="el"href="classKite_1_1TrackElement.html#a45e685b1e3ee630d24bf43746553af4c">TrackElement::setAxis()</a>.</p>
<p>After a <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> has been modificated either the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> element vector or the MarkerElement vector (or both) has been invalidateds. Revalidation take place in three steps:</p>
<li><aclass="el"href="classKite_1_1Track.html#abfffcd781865b94f62f27a1e7be99a38">Track::doRemoval()</a>, remove all <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> marked for removal.</li>
<li><aclass="el"href="classKite_1_1Track.html#aa392ba7cf1e3e485aac11cf326e31918">Track::insert()</a>, insert the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> into their new <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>.</li>
<li><aclass="el"href="classKite_1_1Track.html#aaccb9224f5b38ecd8506fd1eec9ef5ca">Track::doReorder()</a>, sort the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> of the vector, that is, put the newly inserted elements at their right place.</li>
</ul>
<p>Each step must be done <em>for all Tracks</em> before proceeding to the next. This way a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a><code>track</code> field doesn't get set <em>before</em> it has been actually removed from it's previous <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>.</p>
<p>Return in <code>begin</code> the index of the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> whose minimum is immediately below the requested <code>position</code> on the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> axis. The second returned parameter <code>state</code> is a set of flags to tell how the <code>begin</code> index has to be interpreted.</p>
<p>Returns the complete interval of a set of overlapping <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> from the same net. </p>
<p>(implies <code>begin=0</code>) there is no <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a><em>before</em><code>position</code></p>
<p>There is no <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a><em>after</em><code>position</code>. </p>
<p>The <code>begin</code> segment starts and ends <em>before</em><code>position</code>. So the maximum is given by the <code>minimum</code> of the <em>next</em><aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>. </p>
<p>the <code>position</code> is before the first <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>. </p>
<p>the <code>position</code> is inside a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>. </p>
<p><b>Returns:</b><b>true</b> if the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> in horizontal direction. </p>
<p>Implemented in <aclass="el"href="classKite_1_1HorizontalTrack.html#ac46ac3b48d712750c7888b48964ac189">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#ac46ac3b48d712750c7888b48964ac189">VerticalTrack</a>.</p>
<p><b>Returns:</b><b>true</b> if the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> in vertical direction. </p>
<p>Implemented in <aclass="el"href="classKite_1_1HorizontalTrack.html#a2bb30e82aad1f321af4a065338775f36">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#a2bb30e82aad1f321af4a065338775f36">VerticalTrack</a>.</p>
<p><b>Returns:</b><b>true</b> is the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> should be preferentially used for local routing. </p>
<p><b>Returns:</b> The <aclass="el"href="classKite_1_1RoutingPlane.html"title="Array of Tracks in one Layer. ">RoutingPlane</a> owning this <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#ab83ae7101fae68a7db48b96a82cc42f5">Track::getNextTrack()</a>, and <aclass="el"href="classKite_1_1Track.html#a0647664eabb2f70005585316c3681b7f">Track::getPreviousTrack()</a>.</p>
<p><b>Returns:</b> The <aclass="el"href="classKite_1_1KiteEngine.html"title="The Kite Tool. ">KiteEngine</a> owning this <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p><b>Returns:</b> The direction of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, either <aclass="elRef"doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/katabatic/doc/html/katabatic.tag:../katabatic/"href="../katabatic/namespaceKatabatic.html#a2af2ad6b6441614038caf59d04b3b217a1a9045673c5d3c30b067100f1440ae1b">Katabatic::KbHorizontal</a> or <aclass="elRef"doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/katabatic/doc/html/katabatic.tag:../katabatic/"href="../katabatic/namespaceKatabatic.html#a2af2ad6b6441614038caf59d04b3b217a284cad95203a27172838b09e396e3590">Katabatic::KbVertical</a>. </p>
<p>Implemented in <aclass="el"href="classKite_1_1HorizontalTrack.html#a09d03fbca9ab891c2f25bdae7f89a899">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#a09d03fbca9ab891c2f25bdae7f89a899">VerticalTrack</a>.</p>
<p><b>Returns:</b> The index of this <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> in the <aclass="el"href="classKite_1_1RoutingPlane.html"title="Array of Tracks in one Layer. ">RoutingPlane</a><aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> vector. </p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#ad21778972fbdf5cbffb470b2e36f9fcf">Track::check()</a>, <aclass="el"href="classKite_1_1Track.html#ab83ae7101fae68a7db48b96a82cc42f5">Track::getNextTrack()</a>, and <aclass="el"href="classKite_1_1Track.html#a0647664eabb2f70005585316c3681b7f">Track::getPreviousTrack()</a>.</p>
<p><b>Returns:</b> The depth (as given by the RoutingGauge) of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>'s layer. </p>
<p><b>Returns:</b> The <code>Layer</code> of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p><b>Returns:</b> The associated blockage <code>Layer</code> to the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>'s layer. </p>
<p><b>Returns:</b> The minimal allowed coordinate of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p><b>Returns:</b> The maximal allowed coordinate of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p><b>Returns:</b> The next <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> in the <code><aclass="el"href="classKite_1_1RoutingPlane.html"title="Array of Tracks in one Layer. ">RoutingPlane</a></code> vector. That is the one with the axis immediatly superior. </p>
<p>Referenced by <aclass="el"href="classKite_1_1NegociateWindow.html#a7bf31fcd4e4007e62454689ef7c553fc">NegociateWindow::createTrackSegment()</a>, <aclass="el"href="classKite_1_1RoutingEvent.html#a5bd93abe1416952ace15a98dbeeed124">RoutingEvent::revalidate()</a>, and <aclass="el"href="classKite_1_1Manipulator.html#a147c24aa53f561c10d5d24b82b03448a">Manipulator::ripupPerpandiculars()</a>.</p>
<p><b>Returns:</b> The previous <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> in the <code><aclass="el"href="classKite_1_1RoutingPlane.html"title="Array of Tracks in one Layer. ">RoutingPlane</a></code> vector. That is the one with the axis immediatly inferior. </p>
<p><b>Returns:</b> The total number of <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> in the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#a5c9424f73f1fafa422c8dca99c7216bd">Track::getMaximalPosition()</a>, and <aclass="el"href="classKite_1_1Track.html#ac2216be50494af61a7b16d20dd8cc5dd">Track::getSegment()</a>.</p>
<p><b>Returns:</b> the point at <code></code>(position,<aclass="el"href="classKite_1_1Track.html#af85576c58c70007850ad56e238e8d266">getAxis()</a>) for horizontal <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> at or <code></code>(<aclass="el"href="classKite_1_1Track.html#af85576c58c70007850ad56e238e8d266">getAxis()</a>,position) for vertical <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. </p>
<p>Implemented in <aclass="el"href="classKite_1_1HorizontalTrack.html#a87f1520092c5421a57aa2468d2814c09">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#a87f1520092c5421a57aa2468d2814c09">VerticalTrack</a>.</p>
<tr><tdclass="paramname">index</td><td>The index of the <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> at <em>index</em>. The result will be <code>NULL</code> in the follwing cases :<ul>
<li><em>index</em> is outside the sorted zone.</li>
<li><em>index</em> points to a hole in the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>.</li>
<li><em>index</em> is equal to <aclass="el"href="classKite_1_1Track.html#ae0070ea45b2592ce3701ab9e486e58a0">Track::npos</a>. </li>
<tr><tdclass="paramname">position</td><td>The position where to search. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> whose starting point is immediatly inferior to <em>position</em>. </dd></dl>
<tr><tdclass="paramname">index</td><td>Index of the starting <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </td></tr>
<tr><tdclass="paramname">net</td><td>A <code>Net</code> to ignore. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The next <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> (<code>NULL</code> if not found).</dd></dl>
<p>Find, starting from <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> at <em>index</em> the next <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> ignoring <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> from <em>net</em>. <em>index</em> is modified to point on the returned <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. If there's no next <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> (<code>NULL</code>) then index is set to <aclass="el"href="classKite_1_1Track.html#ae0070ea45b2592ce3701ab9e486e58a0">Track::npos</a>. </p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#aead0aa746d8c8ce14a11161baa1aafc4">Track::expandFreeInterval()</a>, <aclass="el"href="classKite_1_1TrackFixedSegment.html#a5af0ac91c558873fea9703e7ab6f48df">TrackFixedSegment::getNext()</a>, <aclass="el"href="classKite_1_1TrackSegment.html#a5af0ac91c558873fea9703e7ab6f48df">TrackSegment::getNext()</a>, <aclass="el"href="classKite_1_1TrackElement.html#a5af0ac91c558873fea9703e7ab6f48df">TrackElement::getNext()</a>, and <aclass="el"href="classKite_1_1Track.html#a13493827f36a960f3c443ff2b8ea0143">Track::getNextFixed()</a>.</p>
<tr><tdclass="paramname">index</td><td>Index of the starting <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </td></tr>
<tr><tdclass="paramname">net</td><td>A <code>Net</code> to ignore. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The previous <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> (<code>NULL</code> if not found).</dd></dl>
<p>find, starting from <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> at <em>index</em> the previous <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> ignoring <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> from <em>net</em>. <em>index</em> is modified to point on the returned <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. If there's no previous <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> (<code>NULL</code>) then index is set to <aclass="el"href="classKite_1_1Track.html#ae0070ea45b2592ce3701ab9e486e58a0">Track::npos</a>. </p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#aead0aa746d8c8ce14a11161baa1aafc4">Track::expandFreeInterval()</a>, <aclass="el"href="classKite_1_1TrackFixedSegment.html#acbb9c965449bf4502d71149563cec0a2">TrackFixedSegment::getPrevious()</a>, <aclass="el"href="classKite_1_1TrackSegment.html#acbb9c965449bf4502d71149563cec0a2">TrackSegment::getPrevious()</a>, and <aclass="el"href="classKite_1_1TrackElement.html#acbb9c965449bf4502d71149563cec0a2">TrackElement::getPrevious()</a>.</p>
<tr><tdclass="paramname">index</td><td>Index of the starting <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The first previous <em>Fixed</em><aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>.</dd></dl>
<p>find, starting from <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> at <em>index</em> the first previous with a <em>Fixed</em> attribute set. <em>index</em> is modified to point on the returned <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. If there's no previous <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> (<code>NULL</code>) then index is set to <aclass="el"href="classKite_1_1Track.html#ae0070ea45b2592ce3701ab9e486e58a0">Track::npos</a>. </p>
<p><b>Returns:</b> the <em>index</em> of <em>element</em> inside the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. If the <em>element</em> do not belongs to the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, return <aclass="el"href="classKite_1_1Track.html#ae0070ea45b2592ce3701ab9e486e58a0">Track::npos</a>. </p>
<p><b>Returns:</b> The source position of <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> pointed by iterator <em>it</em>. If <em>it</em> is equal to <code>end()</code> , returns zero. </p>
<tr><tdclass="paramname">position</td><td>where fo find a free interval. </td></tr>
<tr><tdclass="paramname">net</td><td>for which net to find the free interval. <b>Returns:</b> The longuest free interval enclosing <em>position</em> (may be empty). </td></tr>
<tr><tdclass="paramname">begin</td><td>index of one of the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> set. May be modificated. <b>Returns:</b> the whole interval used by a set of overlaping <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>.</td></tr>
</table>
</dd>
</dl>
<p>As <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> from a same net can overlap, the interval of one of them do not give the full extend of the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> occupation at this point. This function looks for all overlaping segments and returns the merged interval. Additionnaly it sets <code>begin</code> to the index of the lowest <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> of the set.</p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#aead0aa746d8c8ce14a11161baa1aafc4">Track::expandFreeInterval()</a>, <aclass="el"href="classKite_1_1Track.html#a7386d7acfcd1dfbeb906bd4c482d797e">Track::getBeginIndex()</a>, and <aclass="el"href="classKite_1_1Track.html#a414e800da5aa8b03eb82aa0dba883f7f">Track::getOverlapBounds()</a>.</p>
<tr><tdclass="paramname">begin</td><td>the lowest used <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </td></tr>
<tr><tdclass="paramname">end</td><td>the highest used <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </td></tr>
<tr><tdclass="paramname">state</td><td>tells how to interpret the <code>begin</code>&<code>end</code> indexes. </td></tr>
<tr><tdclass="paramname">net</td><td>the for wich we seek place. <b>Returns:</b> The longuest free interval between <code></code>]begin,end[ .</td></tr>
</table>
</dd>
</dl>
<p>Starting from the initial <code>[begin,end]</code> interval, expand the interval to encompass all free space or segments belonging to <code>net</code>. <code>state</code> may be used to compute the interval bounds from <code>begin</code> and <code>end</code> instead of directly using the returned <code>interval</code>.</p>
<dlclass="section note"><dt>Note</dt><dd><code></code>]begin,end[ must define a free interval between two <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. </dd></dl>
<tdclass="paramtype">unsigned int & </td>
<tdclass="paramname"><em>state</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><divclass="memdoc">
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">position</td><td>The position where to search. </td></tr>
<tr><tdclass="paramname">begin</td><td>Index of the immediatly inferior <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>. </td></tr>
<tr><tdclass="paramname">state</td><td>how to interpret the returned <code>begin</code>.</td></tr>
</table>
</dd>
</dl>
<p>Return in <code>begin</code> the index of the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> whose minimum is immediately below the requested <code>position</code> on the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> axis. The second returned parameter <code>state</code> is a set of flags to tell how the <code>begin</code> index has to be interpreted.</p>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa8b61f6a736a067f2124ee5bd5cb8ac71">Track::BeginIsTrackMin</a> : (implies <code>begin=0</code>) there is no <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a><em>before</em><code>position</code>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa24e6a845af9d42451a2c41f2f8d388d1">Track::EndIsSegmentMin</a> : The <code>begin</code> segment starts <em>before</em><code>position</code>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa2558894ee6c661f4c13276cc8f2464a4">Track::BeginIsSegmentMin</a> : The <code>begin</code> segment starts <em>before</em><code>position</code> and ends <em>after</em>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaab507ecf157f576817fafc5e7deb71629">Track::EndIsSegmentMax</a> : The <code>begin</code> segment starts <em>before</em><code>position</code> and ends <em>after</em>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa8b6241764173838bf07e69fb78b688a4">Track::BeginIsSegmentMax</a> : The <code>begin</code> segment starts and ends <em>before</em><code>position</code>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa03aebc159f233b883124bd19fdd2ea0f">Track::EndIsNextSegmentMin</a> : The <code>begin</code> segment starts and ends <em>before</em><code>position</code>. So the maximum is given by the <code>minimum</code> of the <em>next</em><aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa405dc0d4b2391506d0dcc4a75d5f1ba2">Track::EndIsTrackMax</a> : There is no <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a><em>after</em><code>position</code>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa5c7f72d6942ae38d66f530bea1063adf">Track::BeforeFirstElement</a> : the <code>position</code> is before the first <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa36e625d718c74f5ff503638360ba1166">Track::InsideElement</a> : the <code>position</code> is inside a <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a>.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa55d08f66f21334eb8c0dca170f1cb8a4">Track::OutsideElement</a> : the <code>position</code> is in free zone between two TrackElements.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaa3fc579452c9779cd2865d5019a61c6a5">Track::AfterLastElement</a> : the position is after the end of the last element.</li>
<li><aclass="el"href="classKite_1_1Track.html#af4bdc8469c0fee386fc2ff30e0666bcaaa697b71e325cea0980e9555654f8f3cf">Track::EmptyTrack</a> : the track is still empty.</li>
<p><b>Reminder for myself:</b> The <aclass="el"href="classKite_1_1Track.html#a7386d7acfcd1dfbeb906bd4c482d797e">Track::getBeginIndex()</a> function relies on the <ahref="http://www.sgi.com/tech/stl/">STL</a><code>lower_bound()</code> function. <code>lower_bound()</code> finds the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> immediately <em>superior</em> to <code>position</code> (shown on Figure <b>3</b> by the <code>LB</code> label in white on black).</p>
<p>Referenced by <aclass="el"href="classKite_1_1Track.html#a95a9fad401e395a6b0f73e755db6ddad">Track::getFreeInterval()</a>, <aclass="el"href="classKite_1_1Track.html#a414e800da5aa8b03eb82aa0dba883f7f">Track::getOverlapBounds()</a>, and <aclass="el"href="classKite_1_1Track.html#aa8a5a7f28e71bce3676d4a051ab1d6c6">Track::getSegment()</a>.</p>
<tr><tdclass="paramname">begin</td><td>where to store the starting bound. </td></tr>
<tr><tdclass="paramname">end</td><td>where to store the ending bound.</td></tr>
</table>
</dd>
</dl>
<p>find the range of <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> intersecting <em>interval</em>. Note that when the <em>interval</em> lower bound crosses a set of overlaping intervals from the same <code>Net</code>, the interval at <em>begin</em> will crosses the lower bound but some following of the same <code>Net</code> may not. </p>
<p>Referenced by <aclass="el"href="classKite_1_1NegociateWindow.html#a7bf31fcd4e4007e62454689ef7c553fc">NegociateWindow::createTrackSegment()</a>, and <aclass="el"href="classKite_1_1Track.html#ae8e0a72955bd05677d82738ad032526d">Track::getOverlapCost()</a>.</p>
<tr><tdclass="paramname">flags</td><td>passed to the overlap cost function. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The cost of the overlap.</dd></dl>
<p>Compute the cost of the overlap of <em>interval</em> with the range <code></code>[begin,end] of <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>. Any <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> belonging to <em>net</em> will be ignored. </p>
<tr><tdclass="paramname">net</td><td>a Net to ignore (null cost). </td></tr>
<tr><tdclass="paramname">flags</td><td>passed to the overlap cost function.</td></tr>
</table>
</dd>
</dl>
<p>Compute the overlap cost of <em>interval</em> with <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> from the current <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, ignoring thoses belonging to <em>net</em>. </p>
<tr><tdclass="paramname">segment</td><td>under which to compute overlap cost. </td></tr>
<tr><tdclass="paramname">flags</td><td>passed to the overlap cost function.</td></tr>
</table>
</dd>
</dl>
<p>Compute the overlap cost of <code>segment</code> with <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> from the current <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> (interval and net are deduced from <code>segment</code>). </p>
<tdclass="paramtype">unsigned int & </td>
<tdclass="paramname"><em>weight</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><divclass="memdoc">
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">interval</td><td>under which to compute terminal weight. </td></tr>
<tr><tdclass="paramname">net</td><td>a net to be ignored. </td></tr>
<tr><tdclass="paramname">count</td><td>incremented of the number of track markers under the <code>interval</code>. </td></tr>
<tr><tdclass="paramname">weight</td><td>incremented of the sum of the weight of the track markers under the <code>interval</code>.</td></tr>
</table>
</dd>
</dl>
<p>Compute and return the sum of the weight of the track markers (see <aclass="el"href="classKite_1_1TrackMarker.html"title="Tag part of Track with a weight. ">TrackMarker</a>) under <code>interval</code> ignoring <code>net</code> (that is, <em>for</em><code>net</code>).</p>
<dlclass="section user"><dt>Remark:</dt><dd>The referenced variables <code>count</code> and <code>weight</code> are <b>not</b> reset to zero by this function. It is of the caller's responsability. </dd></dl>
<p><b>Returns:</b> The source position of <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> at index <em>index</em>. If <em>index</em> is equal to <aclass="el"href="classKite_1_1Track.html#ae0070ea45b2592ce3701ab9e486e58a0">Track::npos</a>, returns zero. </p>
<tr><tdclass="paramname">overlaps</td><td>The number of overlaping segments. </td></tr>
<tr><tdclass="paramname">message</td><td>An iformative message, only printed if an error occurs. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><b>true</b> if the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> contains no incoherencies.</dd></dl>
<p>Perform a complete <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> check. Looks for the following incoherencies :</p>
<li><aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> do not refers this <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>.</li>
<li><aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> is detached (<aclass="el"href="classKite_1_1TrackElement.html#abfd8de286baf41eea066220773c7046d">TrackSegment::getTrack()</a> is <code>NULL</code>).</li>
<li><aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> is hollow, this one is very unlikely as hollow <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> are only created for the <code>lower_bound()</code>.</li>
<li><code>NULL</code> pointers (should never occurs, nevertheless...)</li>
<li>Two consecutive <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> from different <code>Net</code> must not overlap.</li>
<li>For <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> starting from the same position, the longuest must be first. </li>
<p>Inconditionnaly invalidate the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>, regardless if it has been modificated. The <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> will be forced to be revalidated on closure of the current session. </p>
<p>Adds <em>segment</em> to the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. Must only be used inside a <aclass="el"href="classKite_1_1Session.html"title="Kite update Session. ">Session</a>. They must appears <em>after</em><aclass="el"href="classKite_1_1Track.html#abfffcd781865b94f62f27a1e7be99a38">Track::doRemoval()</a> and <em>before</em><aclass="el"href="classKite_1_1Track.html#aaccb9224f5b38ecd8506fd1eec9ef5ca">Track::doReorder()</a>.</p>
<p>Adds <em>marker</em> to the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. Must only be used inside a <aclass="el"href="classKite_1_1Session.html"title="Kite update Session. ">Session</a>.</p>
<p>Directly affect the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> entry at position <code>index</code> to <code>element</code> (use with great care).</p>
<p><b>Returns:</b> The number of removeds <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a>.</p>
<p>Suppress all the <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> that have been withdraw from the <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a>. <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> must be withdraw trough the <aclass="el"href="classKite_1_1TrackSegment.html#ac295bade8aee589f6718dfa79edc2a34">TrackSegment::detach()</a> method which sets their owning <aclass="el"href="classKite_1_1Track.html"title="Structure managing one routing track. ">Track</a> to <code>NULL</code> (the removal criterion). It uses the <ahref="http://www.sgi.com/tech/stl/">STL</a><em>remove_if</em> algorithm that put all the to be removed elements at the end of the vector.</p>
<p>(Re)sort the <aclass="el"href="classKite_1_1TrackElement.html"title="Abstract Class for all Elements inserted inside a Track. ">TrackElement</a> of the vector. Must be called <em>after:</em></p>
<li><aclass="el"href="classKite_1_1Track.html#abfffcd781865b94f62f27a1e7be99a38">Track::doRemoval()</a> so no detached <aclass="el"href="classKite_1_1TrackSegment.html"title="Derived Katabatic::AutoSegment for the router. ">TrackSegment</a> are presents.</li>
<li>All calls to <aclass="el"href="classKite_1_1Track.html#aa392ba7cf1e3e485aac11cf326e31918">Track::insert()</a>, as the newly inserted elements are put at the back of the vector.</li>