code stringlengths 17 6.64M |
|---|
class Vrepresentation(PolyhedronRepresentation):
'\n The base class for V-representation objects of a\n polyhedron. Inherits from ``PolyhedronRepresentation``.\n '
def __init__(self, polyhedron_parent):
"\n Initializes the PolyhedronRepresentation object.\n\n TESTS::\n\n ... |
class Vertex(Vrepresentation):
'\n A vertex of the polyhedron. Inherits from ``Vrepresentation``.\n '
def type(self):
'\n Return the type (equation/inequality/vertex/ray/line) as an\n integer.\n\n OUTPUT:\n\n Integer. One of ``PolyhedronRepresentation.INEQUALITY``,\n... |
class Ray(Vrepresentation):
'\n A ray of the polyhedron. Inherits from ``Vrepresentation``.\n '
def type(self):
'\n Return the type (equation/inequality/vertex/ray/line) as an\n integer.\n\n OUTPUT:\n\n Integer. One of ``PolyhedronRepresentation.INEQUALITY``,\n ... |
class Line(Vrepresentation):
'\n A line (Minkowski summand `\\simeq\\RR`) of the\n polyhedron. Inherits from ``Vrepresentation``.\n '
def type(self):
'\n Return the type (equation/inequality/vertex/ray/line) as an\n integer.\n\n OUTPUT:\n\n Integer. One of ``Polyh... |
def repr_pretty(coefficients, type, prefix='x', indices=None, latex=False, style='>=', split=False):
'\n Return a pretty representation of equation/inequality represented\n by the coefficients.\n\n INPUT:\n\n - ``coefficients`` -- a tuple or other iterable\n\n - ``type`` -- either ``0`` (``Polyhedr... |
class PseudolineArrangement():
def __init__(self, seq, encoding='auto'):
"\n Creates an arrangement of pseudolines.\n\n INPUT:\n\n - ``seq`` (a sequence describing the line arrangement). It can be:\n\n - A list of `n` permutations of size `n-1`.\n - A list of `\\bin... |
class RelativeInterior(ConvexSet_relatively_open):
'\n The relative interior of a polyhedron or cone\n\n This class should not be used directly. Use methods\n :meth:`~sage.geometry.polyhedron.Polyhedron_base.relative_interior`,\n :meth:`~sage.geometry.polyhedron.Polyhedron_base.interior`,\n :meth:`... |
def _find(l, k):
'\n Return the two coordinates of the element ``k`` in the list of\n lists ``l``.\n\n INPUT:\n\n - ``l`` -- a list of lists\n - ``k`` -- a candidate to be in a list in ``l``\n\n OUTPUT:\n\n A list with two integers describing the position of the first\n instance of `k`` in... |
def _clean(l):
'\n Return a list where empty sublists of ``l`` have been removed.\n\n INPUT:\n\n - ``l`` -- a list of lists\n\n OUTPUT:\n\n - a list which is a copy of ``l`` with all empty sublists removed\n\n EXAMPLES::\n\n sage: from sage.geometry.ribbon_graph import _clean\n sag... |
class RibbonGraph(SageObject, UniqueRepresentation):
'\n A ribbon graph codified as two elements of a certain permutation group.\n\n A comprehensive introduction on the topic can be found in the beginning\n of [GGD2011]_ Chapter 4. More concretely, we will use a variation of what\n is called in the re... |
def make_ribbon(g, r):
'\n Return a ribbon graph whose thickening has genus ``g`` and ``r``\n boundary components.\n\n INPUT:\n\n - ``g`` -- non-negative integer representing the genus of the\n thickening\n\n - ``r`` -- positive integer representing the number of boundary\n components of ... |
def bipartite_ribbon_graph(p, q):
'\n Return the bipartite graph modeling the corresponding\n Brieskorn-Pham singularity.\n\n Take two parallel lines in the plane, and consider `p` points in\n one of them and `q` points in the other. Join with a line each\n point from the first set with every point... |
def _simplify_full_rad(f):
'\n Helper function to conveniently call :meth:`simplify_full` and\n :meth:`canonicalize_radical` in succession.\n\n INPUT:\n\n - ``f`` - a symbolic expression.\n\n EXAMPLES::\n\n sage: from sage.geometry.riemannian_manifolds.parametrized_surface3d import _simplif... |
class ParametrizedSurface3D(SageObject):
"\n Class representing a parametrized two-dimensional surface in\n Euclidian three-space. Provides methods for calculating the main\n geometrical objects related to such a surface, such as the first\n and the second fundamental form, the total (Gaussian) and t... |
class SurfaceGenerators():
'\n A class consisting of generators for several common parametrized surfaces\n in 3D.\n '
@staticmethod
def Catenoid(c=1, name='Catenoid'):
"\n Return a catenoid surface, with parametric representation\n\n .. MATH::\n\n \\begin{aligned... |
def is_ToricLattice(x):
'\n Check if ``x`` is a toric lattice.\n\n INPUT:\n\n - ``x`` -- anything.\n\n OUTPUT:\n\n - ``True`` if ``x`` is a toric lattice and ``False`` otherwise.\n\n EXAMPLES::\n\n sage: from sage.geometry.toric_lattice import (\n ....: is_ToricLattice)\n ... |
def is_ToricLatticeQuotient(x):
'\n Check if ``x`` is a toric lattice quotient.\n\n INPUT:\n\n - ``x`` -- anything.\n\n OUTPUT:\n\n - ``True`` if ``x`` is a toric lattice quotient and ``False`` otherwise.\n\n EXAMPLES::\n\n sage: from sage.geometry.toric_lattice import (\n ....: ... |
class ToricLatticeFactory(UniqueFactory):
'\n Create a lattice for toric geometry objects.\n\n INPUT:\n\n - ``rank`` -- nonnegative integer, the only mandatory parameter;\n\n - ``name`` -- string;\n\n - ``dual_name`` -- string;\n\n - ``latex_name`` -- string;\n\n - ``latex_dual_name`` -- stri... |
class ToricLattice_generic(FreeModule_generic_pid):
'\n Abstract base class for toric lattices.\n '
Element = ToricLatticeElement
def __call__(self, *args, **kwds):
"\n Construct a new element of ``self``.\n\n INPUT:\n\n - anything that can be interpreted as coordinates... |
@richcmp_method
class ToricLattice_ambient(ToricLattice_generic, FreeModule_ambient_pid):
'\n Create a toric lattice.\n\n See :class:`ToricLattice <ToricLatticeFactory>` for documentation.\n\n .. WARNING::\n\n There should be only one toric lattice with the given rank and\n associated names... |
class ToricLattice_sublattice_with_basis(ToricLattice_generic, FreeModule_submodule_with_basis_pid):
'\n Construct the sublattice of ``ambient`` toric lattice with given ``basis``.\n\n INPUT (same as for\n :class:`~sage.modules.free_module.FreeModule_submodule_with_basis_pid`):\n\n - ``ambient`` -- am... |
class ToricLattice_sublattice(ToricLattice_sublattice_with_basis, FreeModule_submodule_pid):
'\n Construct the sublattice of ``ambient`` toric lattice generated by ``gens``.\n\n INPUT (same as for\n :class:`~sage.modules.free_module.FreeModule_submodule_pid`):\n\n - ``ambient`` -- ambient :class:`tori... |
class ToricLattice_quotient_element(FGP_Element):
'\n Create an element of a toric lattice quotient.\n\n .. WARNING::\n\n You probably should not construct such elements explicitly.\n\n INPUT:\n\n - same as for :class:`~sage.modules.fg_pid.fgp_element.FGP_Element`.\n\n OUTPUT:\n\n - eleme... |
class ToricLattice_quotient(FGP_Module_class):
'\n Construct the quotient of a toric lattice ``V`` by its sublattice ``W``.\n\n INPUT:\n\n - ``V`` -- ambient toric lattice;\n\n - ``W`` -- sublattice of ``V``;\n\n - ``check`` -- (default: ``True``) whether to check correctness of input\n or not... |
class ToricPlotter(SageObject):
'\n Create a toric plotter.\n\n INPUT:\n\n - ``all_options`` -- a :class:`dictionary <dict>`, containing any of the\n options related to toric objects (see :func:`options`) and any other\n options that will be passed to lower level plotting functions;\n\n - ``... |
def _unrecognized_option(option):
'\n Raise an exception about wrong ``option``.\n\n INPUT:\n\n - ``option`` -- a string.\n\n OUTPUT:\n\n - none, a :class:`KeyError` exception is raised.\n\n TESTS::\n\n sage: from sage.geometry.toric_plotter import _unrecognized_option\n sage: _unr... |
def color_list(color, n):
'\n Normalize a list of ``n`` colors.\n\n INPUT:\n\n - ``color`` -- anything specifying a :class:`Color`, a list of such\n specifications, or the string "rainbow";\n\n - ``n`` - an integer.\n\n OUTPUT:\n\n - a list of ``n`` colors.\n\n If ``color`` specified a s... |
def label_list(label, n, math_mode, index_set=None):
'\n Normalize a list of ``n`` labels.\n\n INPUT:\n\n - ``label`` -- ``None``, a string, or a list of string;\n\n - ``n`` - an integer;\n\n - ``math_mode`` -- boolean, if ``True``, will produce LaTeX expressions\n for labels;\n\n - ``index... |
def options(option=None, **kwds):
'\n Get or set options for plots of toric geometry objects.\n\n .. NOTE::\n\n This function provides access to global default options. Any of these\n options can be overridden by passing them directly to plotting\n functions. See also :func:`reset_optio... |
def reset_options():
'\n Reset options for plots of toric geometry objects.\n\n OUTPUT:\n\n - none.\n\n EXAMPLES::\n\n sage: toric_plotter.options("show_rays")\n True\n sage: toric_plotter.options(show_rays=False)\n sage: toric_plotter.options("show_rays")\n False\n\... |
def sector(ray1, ray2, **extra_options):
'\n Plot a sector between ``ray1`` and ``ray2`` centered at the origin.\n\n .. NOTE::\n\n This function was intended for plotting strictly convex cones, so it\n plots the smaller sector between ``ray1`` and ``ray2`` and, therefore,\n they cannot ... |
def triangulation_render_2d(triangulation, **kwds):
'\n Return a graphical representation of a 2-d triangulation.\n\n INPUT:\n\n - ``triangulation`` -- a :class:`Triangulation`.\n\n - ``**kwds`` -- keywords that are passed on to the graphics primitives.\n\n OUTPUT:\n\n A 2-d graphics object.\n\n... |
def triangulation_render_3d(triangulation, **kwds):
'\n Return a graphical representation of a 3-d triangulation.\n\n INPUT:\n\n - ``triangulation`` -- a :class:`Triangulation`.\n\n - ``**kwds`` -- keywords that are passed on to the graphics primitives.\n\n OUTPUT:\n\n A 3-d graphics object.\n\... |
class Triangulation(Element):
'\n A triangulation of a\n :class:`~sage.geometry.triangulation.point_configuration.PointConfiguration`.\n\n .. WARNING::\n\n You should never create :class:`Triangulation` objects\n manually. See\n :meth:`~sage.geometry.triangulation.point_configuration... |
class PointConfiguration(UniqueRepresentation, PointConfiguration_base):
'\n A collection of points in Euclidean (or projective) space.\n\n This is the parent class for the triangulations of the point\n configuration. There are a few options to specifically select what\n kind of triangulations are adm... |
class VoronoiDiagram(SageObject):
'\n Base class for the Voronoi diagram.\n\n Compute the Voronoi diagram of a list of points.\n\n INPUT:\n\n - ``points`` -- a list of points. Any valid input for the\n :class:`PointConfiguration` will do.\n\n OUTPUT:\n\n An instance of the VoronoiDiagram c... |
class BipartiteGraph(Graph):
'\n Bipartite graph.\n\n INPUT:\n\n - ``data`` -- can be any of the following:\n\n #. Empty or ``None`` (creates an empty graph).\n\n #. An arbitrary graph.\n\n #. A reduced adjacency matrix.\n\n A reduced adjacency matrix contains only the non-redundan... |
class DiGraph(GenericGraph):
'\n Directed graph.\n\n A digraph or directed graph is a set of vertices connected by oriented\n edges. See also the :wikipedia:`Directed_graph`. For a collection of\n pre-defined digraphs, see the :mod:`~sage.graphs.digraph_generators` module.\n\n A :class:`DiGraph` ob... |
def is_dominating(G, dom, focus=None):
'\n Check whether ``dom`` is a dominating set of ``G``.\n\n We say that a set `D` of vertices of a graph `G` dominates a set `S` if\n every vertex of `S` either belongs to `D` or is adjacent to a vertex of `D`.\n Also, `D` is a dominating set of `G` if it dominat... |
def is_redundant(G, dom, focus=None):
"\n Check whether ``dom`` has redundant vertices.\n\n For a graph `G` and sets `D` and `S` of vertices, we say that a vertex `v\n \\in D` is *redundant* in `S` if `v` has no private neighbor with respect to\n `D` in `S`. In other words, there is no vertex in `S` ... |
def private_neighbors(G, vertex, dom):
'\n Return the private neighbors of a vertex with respect to other vertices.\n\n A private neighbor of a vertex `v` with respect to a vertex subset `D`\n is a closed neighbor of `v` that is not dominated by a vertex of `D\n \\setminus \\{v\\}`.\n\n INPUT:\n\n ... |
def dominating_sets(g, k=1, independent=False, total=False, connected=False, solver=None, verbose=0, *, integrality_tolerance=0.001):
"\n Return an iterator over the minimum distance-`k` dominating sets\n of the graph.\n\n A minimum dominating set `S` of a graph `G` is a set of its vertices of\n minim... |
def dominating_set(g, k=1, independent=False, total=False, connected=False, value_only=False, solver=None, verbose=0, *, integrality_tolerance=0.001):
'\n Return a minimum distance-`k` dominating set of the graph.\n\n A minimum dominating set `S` of a graph `G` is a set of its vertices of\n minimal cardi... |
def _parent(G, dom, V_prev):
'\n Return a subset of dom that is irredundant in ``V_prev``.\n\n For internal use.\n\n INPUT:\n\n - ``G`` -- a graph\n\n - ``dom`` -- an iterable of vertices of ``G``\n\n - ``V_prev`` -- an iterable of vertices of ``G``\n\n OUTPUT:\n\n Return the list obtained... |
def _peel(G, A):
'\n Return a peeling of a vertex iterable of a graph.\n\n For internal use.\n Given a graph `G` and a subset `A` of its vertices, a peeling of `(G,A)` is\n a list `[(u_0, V_0), \\dots, (u_p, V_p)]` such that `u_0` is ``None``,\n `V_0` is the empty set, `V_p = A` and for every `i \\... |
def _cand_ext_enum(G, to_dom, u_next):
'\n Return the minimal dominating sets of ``to_dom``.\n\n For internal use.\n Assumption: ``u_next`` dominates ``to_dom``.\n\n INPUT:\n\n - ``G`` -- a graph\n\n - ``to_dom`` -- a ``set()`` of vertices of ``G``\n\n - ``u_next`` -- a vertex of ``G`` that d... |
def minimal_dominating_sets(G, to_dominate=None, work_on_copy=True, k=1):
"\n Return an iterator over the minimal dominating sets of a graph.\n\n INPUT:\n\n - ``G`` -- a graph.\n\n - ``to_dominate`` -- vertex iterable or ``None`` (default: ``None``);\n the set of vertices to be dominated.\n\n ... |
def greedy_dominating_set(G, k=1, vertices=None, ordering=None, return_sets=False, closest=False):
'\n Return a greedy distance-`k` dominating set of the graph.\n\n A distance-`k` dominating set `S` of a graph `G` is a set of its vertices of\n minimal cardinality such that any vertex of `G` is in `S` or ... |
def maximum_leaf_number(G, solver=None, verbose=0, integrality_tolerance=0.001):
'\n Return the maximum leaf number of the graph.\n\n The maximum leaf number is the maximum possible number of leaves of a\n spanning tree of `G`. This is also the cardinality of the complement of a\n minimum connected do... |
@cached_function
def have_dot2tex():
'\n Returns whether ``dot2tex`` >= 2.8.7 and graphviz are installed\n and functional\n\n EXAMPLES::\n\n sage: sage.graphs.dot2tex_utils.have_dot2tex() # optional - dot2tex graphviz\n True\n sage: sage.graphs.dot2tex_utils.have_dot2tex() in [True,... |
def assert_have_dot2tex():
'\n Tests whether ``dot2tex`` >= 2.8.7 and graphviz are installed and\n functional, and raises an error otherwise\n\n EXAMPLES::\n\n sage: sage.graphs.dot2tex_utils.assert_have_dot2tex() # optional - dot2tex graphviz\n '
check_error_string = '\nAn error occurs wh... |
def quoted_latex(x):
"\n Strips the latex representation of ``x`` to make it suitable for a\n ``dot2tex`` string.\n\n EXAMPLES::\n\n sage: sage.graphs.dot2tex_utils.quoted_latex(matrix([[1,1],[0,1],[0,0]])) # needs sage.modules\n '\\left(\\begin{array}{rr}1 & 1 \\\\0 & 1 \\\\0 & 0\\en... |
def quoted_str(x):
"\n Strip the string representation of ``x`` to make it suitable for\n a ``dot2tex`` string, and especially a node label.\n\n Indeed, ``dot2tex`` gets confused by newlines, and braces.\n\n EXAMPLES::\n\n sage: sage.graphs.dot2tex_utils.quoted_str(matrix([[1,1],[0,1],[0,0]])) ... |
def BullGraph():
"\n Return a bull graph with 5 nodes.\n\n A bull graph is named for its shape. It's a triangle with horns.\n See the :wikipedia:`Bull_graph` for more information.\n\n PLOTTING:\n\n Upon construction, the position dictionary is filled to override the\n spring-layout algorithm. By... |
def ButterflyGraph():
'\n Return the butterfly graph.\n\n Let `C_3` be the cycle graph on 3 vertices. The butterfly or bowtie\n graph is obtained by joining two copies of `C_3` at a common vertex,\n resulting in a graph that is isomorphic to the friendship graph `F_2`.\n See the :wikipedia:`Butterf... |
def CircularLadderGraph(n):
'\n Return a circular ladder graph with `2 * n` nodes.\n\n A Circular ladder graph is a ladder graph that is connected at the ends,\n i.e.: a ladder bent around so that top meets bottom. Thus it can be\n described as two parallel cycle graphs connected at each corresponding... |
def ClawGraph():
'\n Return a claw graph.\n\n A claw graph is named for its shape. It is actually a complete\n bipartite graph with ``(n1, n2) = (1, 3)``.\n\n PLOTTING: See :meth:`CompleteBipartiteGraph`.\n\n EXAMPLES:\n\n Show a Claw graph::\n\n sage: (graphs.ClawGraph()).show() # ... |
def CycleGraph(n):
'\n Return a cycle graph with `n` nodes.\n\n A cycle graph is a basic structure which is also typically called an\n `n`-gon.\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, each cycle graph will be\n ... |
def CompleteGraph(n):
'\n Return a complete graph on `n` nodes.\n\n A Complete Graph is a graph in which all nodes are connected to all\n other nodes.\n\n PLOTTING: Upon construction, the position dictionary is filled to\n override the spring-layout algorithm. By convention, each complete\n grap... |
def CorrelationGraph(seqs, alpha, include_anticorrelation):
'\n Constructs and returns a correlation graph with a node corresponding to each sequence in `seqs`.\n\n Edges are added between nodes where the corresponding sequences have a correlation coeffecient greater than alpha.\n\n If include_anticorrel... |
def CompleteBipartiteGraph(p, q, set_position=True):
'\n Return a Complete Bipartite Graph on `p + q` vertices.\n\n A Complete Bipartite Graph is a graph with its vertices partitioned into two\n groups, `V_1 = \\{0,...,p-1\\}` and `V_2 = \\{p,...,p+q-1\\}`. Each `u \\in\n V_1` is connected to every `v... |
def CompleteMultipartiteGraph(L):
"\n Return a complete multipartite graph.\n\n INPUT:\n\n - ``L`` -- a list of integers; the respective sizes of the components\n\n PLOTTING: Produce a layout of the vertices so that vertices in the same\n vertex set are adjacent and clearly separated from vertices ... |
def DiamondGraph():
'\n Return a diamond graph with 4 nodes.\n\n A diamond graph is a square with one pair of diagonal nodes connected.\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, the diamond graph is drawn as a\n diam... |
def GemGraph():
'\n Return a gem graph with 5 nodes.\n\n A gem graph is a fan graph (4,1).\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, the gem graph is drawn as a gem,\n with the sharp part on the bottom.\n\n EXAMPL... |
def ForkGraph():
'\n Return a fork graph with 5 nodes.\n\n A fork graph, sometimes also called chair graph, is 5 vertex tree.\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, the fork graph is drawn as a\n fork, with the sh... |
def DartGraph():
'\n Return a dart graph with 5 nodes.\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, the dart graph is drawn as a\n dart, with the sharp part on the bottom.\n\n EXAMPLES:\n\n Construct and show a dart ... |
def EmptyGraph():
'\n Return an empty graph (0 nodes and 0 edges).\n\n This is useful for constructing graphs by adding edges and vertices\n individually or in a loop.\n\n PLOTTING: When plotting, this graph will use the default\n spring-layout algorithm, unless a position dictionary is\n specif... |
def ToroidalGrid2dGraph(p, q):
'\n Return a toroidal 2-dimensional grid graph with `p \\times q` nodes (`p` rows\n and `q` columns).\n\n The toroidal 2-dimensional grid with parameters `p,q` is the 2-dimensional\n grid graph with identical parameters to which are added the edges\n `((i, 0), (i, q -... |
def Toroidal6RegularGrid2dGraph(p, q):
'\n Return a toroidal 6-regular grid.\n\n The toroidal 6-regular grid is a 6-regular graph on `p \\times q` vertices\n and its elements have coordinates `(i, j)` for `i \\in \\{0...p-1\\}` and\n `j \\in \\{0...q-1\\}`.\n\n Its edges are those of the :meth:`Tor... |
def Grid2dGraph(p, q, set_positions=True):
"\n Return a `2`-dimensional grid graph with `p \\times q` nodes (`p` rows and\n `q` columns).\n\n A 2d grid graph resembles a `2` dimensional grid. All inner nodes are\n connected to their `4` neighbors. Outer (non-corner) nodes are connected to\n their `... |
def GridGraph(dim_list):
"\n Return an `n`-dimensional grid graph.\n\n INPUT:\n\n - ``dim_list`` -- a list of integers representing the number of nodes to\n extend in each dimension\n\n PLOTTING: When plotting, this graph will use the default spring-layout\n algorithm, unless a position dicti... |
def HouseGraph():
'\n Return a house graph with 5 nodes.\n\n A house graph is named for its shape. It is a triangle (roof) over a\n square (walls).\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, the house graph is drawn w... |
def HouseXGraph():
'\n Return a house X graph with 5 nodes.\n\n A house X graph is a house graph with two additional edges. The upper-right\n corner is connected to the lower-left. And the upper-left corner is\n connected to the lower-right.\n\n PLOTTING: Upon construction, the position dictionary ... |
def LadderGraph(n):
'\n Return a ladder graph with `2 * n` nodes.\n\n A ladder graph is a basic structure that is typically displayed as a ladder,\n i.e.: two parallel path graphs connected at each corresponding node pair.\n\n PLOTTING: Upon construction, the position dictionary is filled to override\... |
def PathGraph(n, pos=None):
"\n Return a path graph with `n` nodes.\n\n A path graph is a graph where all inner nodes are connected to their two\n neighbors and the two end-nodes are connected to their one inner neighbors\n (i.e.: a cycle graph without the first and last node connected).\n\n INPUT:... |
def StarGraph(n):
"\n Return a star graph with `n + 1` nodes.\n\n A Star graph is a basic structure where one node is connected to all other\n nodes.\n\n PLOTTING: Upon construction, the position dictionary is filled to override\n the spring-layout algorithm. By convention, each star graph will be\... |
def ChessboardGraphGenerator(dim_list, rook=True, rook_radius=None, bishop=True, bishop_radius=None, knight=True, knight_x=1, knight_y=2, relabel=False):
"\n Return a Graph built on a `d`-dimensional chessboard with prescribed\n dimensions and interconnections.\n\n This function allows to generate many k... |
def QueenGraph(dim_list, radius=None, relabel=False):
'\n Return the `d`-dimensional Queen Graph with prescribed dimensions.\n\n The 2-dimensional Queen Graph of parameters `n` and `m` is a graph with `nm`\n vertices in which each vertex represents a square in an `n \\times m`\n chessboard, and each e... |
def KingGraph(dim_list, radius=None, relabel=False):
'\n Return the `d`-dimensional King Graph with prescribed dimensions.\n\n The 2-dimensional King Graph of parameters `n` and `m` is a graph with `nm`\n vertices in which each vertex represents a square in an `n \\times m`\n chessboard, and each edge... |
def KnightGraph(dim_list, one=1, two=2, relabel=False):
'\n Return the d-dimensional Knight Graph with prescribed dimensions.\n\n The 2-dimensional Knight Graph of parameters `n` and `m` is a graph with\n `nm` vertices in which each vertex represents a square in an `n \\times m`\n chessboard, and each... |
def RookGraph(dim_list, radius=None, relabel=False):
"\n Return the `d`-dimensional Rook's Graph with prescribed dimensions.\n\n The 2-dimensional Rook's Graph of parameters `n` and `m` is a graph with\n `nm` vertices in which each vertex represents a square in an `n \\times m`\n chessboard, and each ... |
def BishopGraph(dim_list, radius=None, relabel=False):
'\n Return the `d`-dimensional Bishop Graph with prescribed dimensions.\n\n The 2-dimensional Bishop Graph of parameters `n` and `m` is a graph with\n `nm` vertices in which each vertex represents a square in an `n \\times m`\n chessboard, and eac... |
def SymplecticPolarGraph(d, q, algorithm=None):
'\n Return the Symplectic Polar Graph `Sp(d,q)`.\n\n The Symplectic Polar Graph `Sp(d,q)` is built from a projective space of\n dimension `d-1` over a field `F_q`, and a symplectic form `f`. Two vertices\n `u,v` are made adjacent if `f(u,v)=0`.\n\n Se... |
def AffineOrthogonalPolarGraph(d, q, sign='+'):
'\n Return the affine polar graph `VO^+(d,q),VO^-(d,q)` or `VO(d,q)`.\n\n Affine Polar graphs are built from a `d`-dimensional vector space over\n `F_q`, and a quadratic form which is hyperbolic, elliptic or parabolic\n according to the value of ``sign``... |
def _orthogonal_polar_graph(m, q, sign='+', point_type=[0]):
'\n A helper function to build ``OrthogonalPolarGraph`` and ``NO2,3,5`` graphs.\n\n See the `page of\n Andries Brouwer\'s website <https://www.win.tue.nl/~aeb/graphs/srghub.html>`_.\n\n INPUT:\n\n - ``m,q`` -- integers; `q` must be a prim... |
def OrthogonalPolarGraph(m, q, sign='+'):
'\n Return the Orthogonal Polar Graph `O^{\\epsilon}(m,q)`.\n\n For more information on Orthogonal Polar graphs, see the `page of Andries\n Brouwer\'s website <https://www.win.tue.nl/~aeb/graphs/srghub.html>`_.\n\n INPUT:\n\n - ``m,q`` -- integers; `q` must... |
def NonisotropicOrthogonalPolarGraph(m, q, sign='+', perp=None):
'\n Return the Graph `NO^{\\epsilon,\\perp}_{m}(q)`\n\n Let the vectorspace of dimension `m` over `F_q` be endowed with a\n nondegenerate quadratic form `F`, of type ``sign`` for `m` even.\n\n * `m` even: assume further that `q=2` or `3`... |
def _polar_graph(m, q, g, intersection_size=None):
'\n The helper function to build graphs `(D)U(m,q)` and `(D)Sp(m,q)`\n\n Building a graph on an orbit of a group `g` of `m\\times m` matrices over\n `GF(q)` on the points (or subspaces of dimension ``m//2``) isotropic\n w.r.t. the form `F` left invari... |
def UnitaryPolarGraph(m, q, algorithm='gap'):
'\n Return the Unitary Polar Graph `U(m,q)`.\n\n For more information on Unitary Polar graphs, see the `page of Andries\n Brouwer\'s website <https://www.win.tue.nl/~aeb/graphs/srghub.html>`_.\n\n INPUT:\n\n - ``m,q`` -- integers; `q` must be a prime po... |
def NonisotropicUnitaryPolarGraph(m, q):
'\n Return the Graph `NU(m,q)`.\n\n This returns the graph on nonisotropic, with respect to a nondegenerate\n Hermitean form, points of the `(m-1)`-dimensional projective space over\n `F_q`, with points adjacent whenever they lie on a tangent (to the set of\n ... |
def UnitaryDualPolarGraph(m, q):
"\n Return the Dual Unitary Polar Graph `U(m,q)`.\n\n For more information on Unitary Dual Polar graphs, see [BCN1989]_ and\n Sect. 2.3.1 of [Coh1981]_.\n\n INPUT:\n\n - ``m,q`` -- integers; `q` must be a prime power\n\n EXAMPLES:\n\n The point graph of a gene... |
def SymplecticDualPolarGraph(m, q):
'\n Return the Symplectic Dual Polar Graph `DSp(m,q)`.\n\n For more information on Symplectic Dual Polar graphs, see [BCN1989]_ and\n Sect. 2.3.1 of [Coh1981]_.\n\n INPUT:\n\n - ``m,q`` -- integers; `q` must be a prime power, and `m` must be even\n\n EXAMPLES:... |
def TaylorTwographDescendantSRG(q, clique_partition=False):
"\n Return the descendant graph of the Taylor's two-graph for `U_3(q)`, `q` odd.\n\n This is a strongly regular graph with parameters\n `(v,k,\\lambda,\\mu)=(q^3, (q^2+1)(q-1)/2, (q-1)^3/4-1, (q^2+1)(q-1)/4)`\n obtained as a two-graph descend... |
def TaylorTwographSRG(q):
"\n Return a strongly regular graph from the Taylor's two-graph for `U_3(q)`,\n `q` odd\n\n This is a strongly regular graph with parameters\n `(v,k,\\lambda,\\mu)=(q^3+1, q(q^2+1)/2, (q^2+3)(q-1)/4, (q^2+1)(q+1)/4)`\n in the Seidel switching class of\n :func:`Taylor tw... |
def AhrensSzekeresGeneralizedQuadrangleGraph(q, dual=False):
'\n Return the collinearity graph of the generalized quadrangle `AS(q)`, or of\n its dual\n\n Let `q` be an odd prime power. `AS(q)` is a generalized quadrangle\n (:wikipedia:`Generalized_quadrangle`) of\n order `(q-1,q+1)`, see 3.1.5 in... |
def T2starGeneralizedQuadrangleGraph(q, dual=False, hyperoval=None, field=None, check_hyperoval=True):
"\n Return the collinearity graph of the generalized quadrangle `T_2^*(q)`, or\n of its dual\n\n Let `q=2^k` and `\\Theta=PG(3,q)`. `T_2^*(q)` is a generalized quadrangle\n (:wikipedia:`Generalized_... |
def HaemersGraph(q, hyperoval=None, hyperoval_matching=None, field=None, check_hyperoval=True):
"\n Return the Haemers graph obtained from `T_2^*(q)^*`\n\n Let `q` be a power of 2. In Sect. 8.A of [BL1984]_ one finds a construction\n of a strongly regular graph with parameters `(q^2(q+2),q^2+q-1,q-2,q)` ... |
def CossidentePenttilaGraph(q):
'\n Return the Cossidente-Penttila\n `((q^3+1)(q+1)/2,(q^2+1)(q-1)/2,(q-3)/2,(q-1)^2/2)`-strongly regular graph\n\n For each odd prime power `q`, one can partition the points of the\n `O_6^-(q)`-generalized quadrangle `GQ(q,q^2)` into two parts, so that on any\n of t... |
def Nowhere0WordsTwoWeightCodeGraph(q, hyperoval=None, field=None, check_hyperoval=True):
'\n Return the subgraph of nowhere 0 words from two-weight code of projective\n plane hyperoval.\n\n Let `q=2^k` and `\\Pi=PG(2,q)`. Fix a\n `hyperoval <http://en.wikipedia.org/wiki/Oval_(projective_plane)#Even_... |
def OrthogonalDualPolarGraph(e, d, q):
'\n Return the dual polar graph on `GO^e(n,q)` of diameter `d`.\n\n The value of `n` is determined by `d` and `e`.\n\n The graph is distance-regular with classical parameters `(d, q, 0, q^e)`.\n\n INPUT:\n\n - ``e`` -- integer; type of the orthogonal polar spa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.