=========== Style Guide =========== .. contents:: Table of Contents :backlinks: top .. Quick reference guide: .. .. reStructuredText references can be found at: .. * http://docutils.sourceforge.net/ Definitions =========== Certain text will be defined with special font when discussed within a body of text. The following table illustrates the definitions: ========== ===================== Definition Example ========== ===================== Data :d:`UNDEFINED` Function :f:`get2dmarkerat()` Arguments :a:`filename` Class :c:`RunFile` Exception :c:`ModelError` Filename :file:`samp15.dat` ========== ===================== Arguments, when used within a square brackets ([]), are defined as optional. Sample Definitions ================== In addition, there will be definitions of various functions, classes and exceptions used throughout the documentation. Some examples of the definitions are as follows, :dd:`UNDEFINED` The value used to mark a particular model cell's item as not used. :df:`get2dmarkerat(index)` Retrieves a 2d marker from the geometry MSR. Argument: :a:`index` : integer index into the list of internal markers. Returns (list) the marker at the given index. :df:`ispointcoincident(p1, p2 [,epsilon])` Indicates if two points are nearly the same (within a given EPSILON). Two points are compared on an element by element basis. That is they the points are deemed coincident if they satisfy, (\|x1-x2\| < epsilon) and (\|y1-y2\| < epsilon) and (\|z1-z2\| < epsilon) Arguments: :a:`p1` : list a point, defined as a list [x, y, z]. :a:`p2` : list another point, defined as a list [x, y, z]. :a:`epsilon` : float the tolerance that decides the level of equality such that: \|x1-x2\| < epsilon. Returns (integer) 1 if both points are equal; 0 otherwise. class :dc:`RunFile` File like object that makes runfile composition easier. exception :de:`ModelError` Generated when a model is unable to complete a requested action. A code block will be defined as follows, .. Python:: pit1path = os.path.join(datamanager.ROOT, "phase2", "pit1") References ========== References will be done in the standard MLA style. References to external hyperlink pages will be, generally, of the form, Author. "Name of page." *Name of Site*. Date of Page. Date Accessed. . If a particular field is missing, it may be omitted from the overall reference. For example, site often do not have a single author, in that case you may omit the author from the reference. An example would be something like, "os.path -- Common pathname manipulations." *Python Library Reference*. 21 December 2001. 11 May 2004.