Popular recipes tagged "oriented" but not "closure"http://code.activestate.com/recipes/tags/oriented-closure/2011-04-21T13:40:32-07:00ActiveState Code RecipesSimple graph algorithms with a modular design (Python) 2011-04-21T13:40:32-07:00jimmy2timeshttp://code.activestate.com/recipes/users/4177690/http://code.activestate.com/recipes/577668-simple-graph-algorithms-with-a-modular-design/ <p style="color: grey"> Python recipe 577668 by <a href="/recipes/users/4177690/">jimmy2times</a> (<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/breadth/">breadth</a>, <a href="/recipes/tags/depth/">depth</a>, <a href="/recipes/tags/directed/">directed</a>, <a href="/recipes/tags/first/">first</a>, <a href="/recipes/tags/graph/">graph</a>, <a href="/recipes/tags/object/">object</a>, <a href="/recipes/tags/oriented/">oriented</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/search/">search</a>, <a href="/recipes/tags/theory/">theory</a>, <a href="/recipes/tags/undirected/">undirected</a>, <a href="/recipes/tags/visit/">visit</a>). Revision 7. </p> <p>The purpose of this recipe is to look at algorithmic graph theory from an object-oriented perspective.</p> <p>A graph is built on top of a dictionary indexed by its vertices, each item being the set of neighbours of the key vertex. This ensures that iterating through the neighbours of a vertex is still efficient in sparse graphs (as with adjacency lists) while at the same time checking for adjacency is expected constant-time (as with the adjacency matrix).</p> <p>Any valid class of graph must implement the interface defined by AbstractGraph.</p> <p>A generic search algorithm takes as input a graph, source and target vertices and a queue. A queue must implement the methods Q.get(), Q.put() and Q.empty() in such a way to get the desired order in visiting the vertices.</p> <p>Given this pattern, breadth-first and depth-first search are essentially defined by the corresponding expansion policies: the first one uses an actual FIFO queue, the second one a LIFO queue (or stack).</p> Git Shell Script to enhance inline automation script... (Bash) 2010-11-01T00:43:03-07:00Patrick Riendeauhttp://code.activestate.com/recipes/users/4175653/http://code.activestate.com/recipes/577447-git-shell-script-to-enhance-inline-automation-scri/ <p style="color: grey"> Bash recipe 577447 by <a href="/recipes/users/4175653/">Patrick Riendeau</a> (<a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/concurrency/">concurrency</a>, <a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/oop/">oop</a>, <a href="/recipes/tags/oriented/">oriented</a>, <a href="/recipes/tags/programs/">programs</a>, <a href="/recipes/tags/property/">property</a>, <a href="/recipes/tags/property_creation/">property_creation</a>, <a href="/recipes/tags/repository/">repository</a>, <a href="/recipes/tags/shell/">shell</a>, <a href="/recipes/tags/shelve/">shelve</a>). </p> <p>This tiny effort, depend from Fnct.D ActiveState no.577446 Core, also available from github <a href="http://github.com/priendeau/Fnct.d" rel="nofollow">http://github.com/priendeau/Fnct.d</a>, can develop basic methodology of implementing oriented program within uses of function re-declaration with function-parser to create both property-function to discover uses of getter-function and setter-function</p> Fnct.D, comprehensive Bash-shell coding scheme. (Bash) 2010-11-01T00:29:09-07:00Patrick Riendeauhttp://code.activestate.com/recipes/users/4175653/http://code.activestate.com/recipes/577446-fnctd-comprehensive-bash-shell-coding-scheme/ <p style="color: grey"> Bash recipe 577446 by <a href="/recipes/users/4175653/">Patrick Riendeau</a> (<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/object/">object</a>, <a href="/recipes/tags/oop/">oop</a>, <a href="/recipes/tags/oriented/">oriented</a>, <a href="/recipes/tags/shell/">shell</a>, <a href="/recipes/tags/system/">system</a>). </p> <p>A Bash compromising shell-module to pre-introduce object-oriented Bash-code.</p> Elegant (?) AoP for methods and functions (Python) 2010-03-02T20:10:38-08:00Alec Thomashttp://code.activestate.com/recipes/users/2870300/http://code.activestate.com/recipes/577082-elegant-aop-for-methods-and-functions/ <p style="color: grey"> Python recipe 577082 by <a href="/recipes/users/2870300/">Alec Thomas</a> (<a href="/recipes/tags/aop/">aop</a>, <a href="/recipes/tags/aspect/">aspect</a>, <a href="/recipes/tags/join/">join</a>, <a href="/recipes/tags/oriented/">oriented</a>, <a href="/recipes/tags/point/">point</a>). Revision 2. </p> <p>There are a couple of other AoP related recipes on ASPN. This one is designed to have a simple, elegant interface.</p>