<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><ul>
<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><ul>
<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>
<tr><thcolspan="2">Enumerator</th></tr><tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa8b61f6a736a067f2124ee5bd5cb8ac71"></a>BeginIsTrackMin </td><tdclass="fielddoc"><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>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa405dc0d4b2391506d0dcc4a75d5f1ba2"></a>EndIsTrackMax </td><tdclass="fielddoc"><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>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa03aebc159f233b883124bd19fdd2ea0f"></a>EndIsNextSegmentMin </td><tdclass="fielddoc"><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>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa5c7f72d6942ae38d66f530bea1063adf"></a>BeforeFirstElement </td><tdclass="fielddoc"><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>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa36e625d718c74f5ff503638360ba1166"></a>InsideElement </td><tdclass="fielddoc"><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>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa55d08f66f21334eb8c0dca170f1cb8a4"></a>OutsideElement </td><tdclass="fielddoc"><p>the <code>position</code> is in free zone between two TrackElements. </p>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa3fc579452c9779cd2865d5019a61c6a5"></a>AfterLastElement </td><tdclass="fielddoc"><p>the position is after the end of the last element. </p>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaaa697b71e325cea0980e9555654f8f3cf"></a>EmptyTrack </td><tdclass="fielddoc"><p>the track is still empty. </p>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa8621fa6a5b7a491fd1bf8dd7f0dd3589"></a>BeginMask </td><tdclass="fielddoc"><p>To extract the <em>begin</em> part from a combination of flags. </p>
<tr><tdclass="fieldname"><aid="af4bdc8469c0fee386fc2ff30e0666bcaa0b5a81972d3a6718c3d68199467d2d11"></a>EndMask </td><tdclass="fielddoc"><p>To extract the <em>end</em> part from a combination of flags. </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#a21b9cefd33ae22e4c2070ad441bdd30b">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#a21b9cefd33ae22e4c2070ad441bdd30b">VerticalTrack</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1TrackFixedSegment.html#a21b9cefd33ae22e4c2070ad441bdd30b">TrackFixedSegment::isHorizontal()</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#abd54544ef1710ee4b67cfb021d73446c">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#abd54544ef1710ee4b67cfb021d73446c">VerticalTrack</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1TrackFixedSegment.html#abd54544ef1710ee4b67cfb021d73446c">TrackFixedSegment::isVertical()</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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#a1b8af68504f2de84cb85cf25e30f93bd">Track::getNextTrack()</a>, and <aclass="el"href="classKite_1_1Track.html#a984171d836a7f61df95e74beeddcf6b5">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 Katabatic::KbHorizontal or Katabatic::KbVertical. </p>
<p>Implemented in <aclass="el"href="classKite_1_1HorizontalTrack.html#a0dd7cf705ace42c662c289955313b2e9">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#a0dd7cf705ace42c662c289955313b2e9">VerticalTrack</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1TrackFixedSegment.html#a0dd7cf705ace42c662c289955313b2e9">TrackFixedSegment::getDirection()</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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#a711798bd60e6e58a99c61f7c6ee9c63a">Track::check()</a>, <aclass="el"href="classKite_1_1Track.html#a1b8af68504f2de84cb85cf25e30f93bd">Track::getNextTrack()</a>, and <aclass="el"href="classKite_1_1Track.html#a984171d836a7f61df95e74beeddcf6b5">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>
<pclass="reference">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1NegociateWindow.html#a7bf31fcd4e4007e62454689ef7c553fc">NegociateWindow::createTrackSegment()</a>.</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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#a68124797edd88ebaf3c9aa00d6ee7822">Track::getMaximalPosition()</a>, and <aclass="el"href="classKite_1_1Track.html#acb93796a96c9737133fb5d90837ab81d">Track::getSegment()</a>.</p>
<p><b>Returns:</b> the point at <code></code>(position,<aclass="el"href="classKite_1_1Track.html#ab5b5aaa5b318369feee6003dbad039c2">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#ab5b5aaa5b318369feee6003dbad039c2">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#a6ab4f8026e4500918aa8721f1199f8b6">HorizontalTrack</a>, and <aclass="el"href="classKite_1_1VerticalTrack.html#a6ab4f8026e4500918aa8721f1199f8b6">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#a225a347d3fba958b5f95ffbc2da499c5">Track::expandFreeInterval()</a>, <aclass="el"href="classKite_1_1TrackFixedSegment.html#a010b7fc8801c5b88aefa4137cf85186d">TrackFixedSegment::getNext()</a>, <aclass="el"href="classKite_1_1TrackSegment.html#a010b7fc8801c5b88aefa4137cf85186d">TrackSegment::getNext()</a>, <aclass="el"href="classKite_1_1TrackElement.html#a010b7fc8801c5b88aefa4137cf85186d">TrackElement::getNext()</a>, and <aclass="el"href="classKite_1_1Track.html#a72e18efeecb4641a1ad2989d80b48fec">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#a225a347d3fba958b5f95ffbc2da499c5">Track::expandFreeInterval()</a>, <aclass="el"href="classKite_1_1TrackFixedSegment.html#a55d6115d84c11ad147f4c38fe372ea24">TrackFixedSegment::getPrevious()</a>, <aclass="el"href="classKite_1_1TrackSegment.html#a55d6115d84c11ad147f4c38fe372ea24">TrackSegment::getPrevious()</a>, and <aclass="el"href="classKite_1_1TrackElement.html#a55d6115d84c11ad147f4c38fe372ea24">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#a225a347d3fba958b5f95ffbc2da499c5">Track::expandFreeInterval()</a>, <aclass="el"href="classKite_1_1Track.html#a33a6c0eebb0d4d50f639ae49a4d6252f">Track::getBeginIndex()</a>, and <aclass="el"href="classKite_1_1Track.html#aeeb787cb8a5ccbedc8697ea6811af2f6">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#a33a6c0eebb0d4d50f639ae49a4d6252f">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1Track.html#aa9c09467d45d95b3ac2b58f09c04ff8d">Track::getFreeInterval()</a>, <aclass="el"href="classKite_1_1Track.html#aeeb787cb8a5ccbedc8697ea6811af2f6">Track::getOverlapBounds()</a>, and <aclass="el"href="classKite_1_1Track.html#a6962a27db7ae946217ea692983fc6a8c">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1NegociateWindow.html#a7bf31fcd4e4007e62454689ef7c553fc">NegociateWindow::createTrackSegment()</a>, and <aclass="el"href="classKite_1_1Track.html#a7f113e53fbd0654e8ecf8927ead9e4fc">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: The referenced variables <code>count</code> and <code>weight</code> are not reset to</dt><dd>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><ul>
<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#a3f34f9139b8491a0adb531ac3a904171">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>
<pclass="reference">Referenced by <aclass="el"href="classKite_1_1TrackSegment.html#acc245ce084989d1c34816d0e61b9d510">TrackSegment::swapTrack()</a>.</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><ul>
<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>