This is ThinSincereQuivers.info, produced by Macaulay2, version 1.20

ThinSincereQuivers -- creating and manipulating Toric Quivers
*************************************************************

Description
===========

ThinSincereQuivers is a package for creating and manipulating toric quivers.

For further details in the theory, we suggest the following articles and the
references within them:

  * Lutz Hille, Quivers, cones and polytopes,  (see
    https://doi.org/10.1016/S0024-3795(02)00406-8 ) Linear algebra and its
    applications 365 (2003): 215-237.
  * Mátyás Domokos and  Dániel Joó, On the equations and classification of
    toric quiver varieties (see https://arxiv.org/abs/1402.5096v1 ),
    Proceedings. Section A, Mathematics-The Royal Society of Edinburgh 146.2
    (2016): 265.

Menu
====

  * toric quiver representation
  * subquiver representation

Authors
=======

  * Mary Barker (see https://github.com/marybarker ) <marybarker@wustl.edu>
  * Patricio Gallardo (see http://patriciogallardo.com/ ) <pgallard@ucr.edu>

Version
=======

This documentation describes version 0.0 of ThinSincereQuivers.

Source code
===========

The source code from which this documentation is derived is in the file
ThinSincereQuivers.m2 (see common/share/Macaulay2/ThinSincereQuivers.m2 ).

Exports
=======

  * Types
      * ToricQuiver -- the ToricQuiver datatype
  * Functions and commands
      * allSpanningTrees -- find the spanning trees of
        the underlying graph
      * basisForFlowPolytope -- compute the
        necessary basis vectors for the hyperplane of a flow polytope
      * bipartiteQuiver -- make a toric quiver on
        underlying bipartite graph
      * chainQuiver -- make a toric quiver on underlying
        graph in the form of a chain
      * coneSystem -- compute the chamber decomposition of
        weights
      * flowPolytope -- generate the polytope associated
        to a toric quiver
      * incInverse -- compute a flow in the preimage for a
        given weight
      * isAcyclic -- check that a quiver has no cycles
      * isClosedUnderArrows -- is a subquiver
        closed under arrows?
      * isSemistable -- determines if a subquiver is
        semistable with respect to a given weight
      * isStable -- determines if a subquiver is semistable
        with respect to a given weight
      * isTight -- determine if toric quiver is tight
      * makeTight -- return a tight quiver with the same flow
        polytope
      * maxCodimensionUnstable -- compute the
        maximal codimension of the unstable loci of a quiver
      * maximalNonstableSubquivers -- return
        the maximal subquivers that are semistable
      * maximalUnstableSubquivers -- return
        the maximal subquivers that are unstable
      * mergeOnArrow -- join two quivers together by
        identifying an arrow from each
      * mergeOnVertex -- join two quivers together by
        identifying a vertex from each
      * potentialWalls -- return the potential walls in
        the weight chamber decomposition for a given quiver
      * primitiveArrows -- list the primitive arrows in
        a quiver
      * quiverEdges -- return the graph edges associated to
        the toric quiver
      * quiverFlow -- return the flow attribute associated
        to the toric quiver
      * quiverIncidenceMatrix -- return the graph
        incidence matrix attribute associated to the toric quiver
      * quiverWeights -- return the weight attribute
        associated to the toric quiver
      * referenceThetas -- return a weight for all
        polytopes associated to a toric quiver
      * sameChamber -- determine if two weights lie in the
        same chamber
      * stableTrees -- return the spanning trees that are
        stable
      * subquivers -- return all possible subquivers of a
        given quiver
      * theta -- image of the flow on the vertices
      * threeVertexQuiver -- make a toric quiver on
        underlying graph with three vertices and a specified number of edges
        between each
      * toricQuiver -- the toricQuiver constructor
      * wallType -- get the type of a wall for a given quiver
  * Methods
      * "basisForFlowPolytope(List,ToricQuiver)" -- see
        basisForFlowPolytope, -- compute the necessary
        basis vectors for the hyperplane of a flow polytope
      * "basisForFlowPolytope(ToricQuiver)" -- see basisForFlowPolytope,
        -- compute the necessary basis vectors for the
        hyperplane of a flow polytope
      * "flowPolytope(List,ToricQuiver)" -- see flowPolytope,
        -- generate the polytope associated to a toric quiver
      * "flowPolytope(ToricQuiver)" -- see flowPolytope, --
        generate the polytope associated to a toric quiver
      * "isAcyclic(ToricQuiver)" -- see isAcyclic, -- check
        that a quiver has no cycles
      * "isClosedUnderArrows(List,ToricQuiver)" -- see
        isClosedUnderArrows, -- is a subquiver closed
        under arrows?
      * "isClosedUnderArrows(Matrix,ToricQuiver)" -- see
        isClosedUnderArrows, -- is a subquiver closed
        under arrows?
      * "isClosedUnderArrows(ToricQuiver,ToricQuiver)" -- see
        isClosedUnderArrows, -- is a subquiver closed
        under arrows?
      * "isSemistable(List,ToricQuiver)" -- see isSemistable,
        -- determines if a subquiver is semistable with respect
        to a given weight
      * "isSemistable(ToricQuiver,ToricQuiver)" -- see isSemistable,
        -- determines if a subquiver is semistable with respect
        to a given weight
      * "isStable(List,ToricQuiver)" -- see isStable, --
        determines if a subquiver is semistable with respect to a given weight
      * "isStable(ToricQuiver,ToricQuiver)" -- see isStable, --
        determines if a subquiver is semistable with respect to a given weight
      * "isTight(List,ToricQuiver)" -- see isTight, -- determine
        if toric quiver is tight
      * "isTight(ToricQuiver)" -- see isTight, -- determine if
        toric quiver is tight
      * "isTight(ToricQuiver,List)" -- see isTight, -- determine
        if toric quiver is tight
      * "maxCodimensionUnstable(ToricQuiver)" -- see
        maxCodimensionUnstable, -- compute the maximal
        codimension of the unstable loci of a quiver
      * "mergeOnArrow(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnArrow,
        -- join two quivers together by identifying an arrow from
        each
      * "mergeOnArrow(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnArrow,
        -- join two quivers together by identifying an arrow from
        each
      * "mergeOnArrow(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see
        mergeOnArrow, -- join two quivers together by identifying
        an arrow from each
      * "mergeOnVertex(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnVertex,
        -- join two quivers together by identifying a vertex
        from each
      * "mergeOnVertex(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnVertex,
        -- join two quivers together by identifying a vertex
        from each
      * "mergeOnVertex(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see
        mergeOnVertex, -- join two quivers together by
        identifying a vertex from each
      * "potentialWalls(ToricQuiver)" -- see potentialWalls,
        -- return the potential walls in the weight chamber
        decomposition for a given quiver
      * "subquivers(ToricQuiver)" -- see subquivers, --
        return all possible subquivers of a given quiver
      * "theta(ToricQuiver)" -- see theta, -- image of the flow on
        the vertices
      * "toricQuiver(List)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(List,List)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(Matrix)" -- see toricQuiver, -- the
        toricQuiver constructor
      * "toricQuiver(Matrix,List)" -- see toricQuiver, --
        the toricQuiver constructor
      * "toricQuiver(ToricQuiver)" -- see toricQuiver, --
        the toricQuiver constructor
      * "toricQuiver(ToricQuiver,List)" -- see toricQuiver,
        -- the toricQuiver constructor
      * ToricQuiver == ToricQuiver, --
        comparing instances of ToricQuiver
      * ToricQuiver ^ List -- taking a subquiver by
        indexing
      * ToricQuiver _ List -- taking a subquiver
        by indexing
      * "wallType(List,ToricQuiver)" -- see wallType, -- get
        the type of a wall for a given quiver
  * Symbols
      * AsSubquiver
      * Flow
      * ReturnSingletons

For the programmer
==================

The object ThinSincereQuivers, is a package (Macaulay2Doc).

allSpanningTrees -- find the spanning trees of the underlying graph
*******************************************************************

Synopsis
========

  * Usage:
        allSpanningTrees Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,

Description
===========

This method returns all of the spanning trees of the underlying graph of the
quiver Q. Trees are represented as lists of arrow indices.

+-----------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                               |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }     |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |                    |
|                                    | 0  0  0  -1 -1 -1 |                    |
|                                    | 1  0  0  1  0  0  |                    |
|                                    | 0  1  0  0  1  0  |                    |
|                                    | 0  0  1  0  0  1  |                    |
|                 Q0 => {0, 1, 2, 3, 4}                                       |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}}      |
|                 weights => {-3, -3, 2, 2, 2}                                |
|                                                                             |
|o1 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i2 : allSpanningTrees(Q)                                                     |
|                                                                             |
|o2 = {{2, 3, 4, 5}, {1, 3, 4, 5}, {0, 3, 4, 5}, {0, 2, 4, 5}, {0, 1, 4, 5},  |
|     ------------------------------------------------------------------------|
|     {1, 2, 3, 5}, {0, 1, 3, 5}, {0, 1, 2, 5}, {1, 2, 3, 4}, {0, 2, 3, 4},   |
|     ------------------------------------------------------------------------|
|     {0, 1, 2, 4}, {0, 1, 2, 3}}                                             |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object allSpanningTrees, is a function closure (Macaulay2Doc).

AsSubquiver
***********

Description
===========

option for subquiver representation. Applying AsSubquiver = true insures that
the matrix representation of the subquiver is the same size as the matrix
original quiver. If false, then the subquiver is returned as a standalone
quiver represented by only the vertices and arrows comprising the subquiver.

+-----------------------------------------------------------------------------+
|i1 : subquivers(bipartiteQuiver(2, 2), Format=>"quiver", AsSubquiver=>true)  |
|                                                                             |
|o1 = {ToricQuiver{flow => {1, 0, 0, 0}                  },                   |
|                  IncidenceMatrix => | -1 -1 0  0  |                         |
|                                     | 0  0  -1 -1 |                         |
|                                     | 1  0  1  0  |                         |
|                                     | 0  1  0  1  |                         |
|                  Q0 => {0, 1, 2, 3}                                         |
|                  Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                     |
|                  weights => {-1, 0, 1, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, 0, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {0, -1, 1, 0}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {0, -1, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-2, 0, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 2, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 0, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {0, -2, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 1}                  }}                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : subquivers(bipartiteQuiver(2, 2), Format=>"quiver", AsSubquiver=>false) |
|                                                                             |
|o2 = {ToricQuiver{flow => {1}              }, ToricQuiver{flow => {1}        |
|                  IncidenceMatrix => | -1 |               IncidenceMatrix => |
|                                     | 1  |                                  |
|                  Q0 => {0, 1}                            Q0 => {0, 1}       |
|                  Q1 => {{0, 1}}                          Q1 => {{0, 1}}     |
|                  weights => {-1, 1}                      weights => {-1, 1} |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|           }, ToricQuiver{flow => {1}              },                        |
|     | -1 |               IncidenceMatrix => | -1 |                          |
|     | 1  |                                  | 1  |                          |
|                          Q0 => {0, 1}                                       |
|                          Q1 => {{0, 1}}                                     |
|                          weights => {-1, 1}                                 |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              }, ToricQuiver{flow => {1, 1}      |
|                 IncidenceMatrix => | -1 |               IncidenceMatrix =>  |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                          Q0 => {0, 1, 2}     |
|                 weights => {-1, 1}                      Q1 => {{0, 1}, {0,  |
|                                                         weights => {-2, 1,  |
|                                                                             |
|     ------------------------------------------------------------------------|
|              }, ToricQuiver{flow => {1, 1}              },                  |
|     | -1 -1 |               IncidenceMatrix => | -1 0  |                    |
|     | 1  0  |                                  | 0  -1 |                    |
|     | 0  1  |                                  | 1  1  |                    |
|                             Q0 => {0, 1, 2}                                 |
|     2}}                     Q1 => {{0, 2}, {1, 2}}                          |
|     1}                      weights => {-1, -1, 2}                          |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 0  1  |                                |
|                                    | 1  0  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}}                                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 3}}                                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {1, 2}}                                      |
|                 weights => {-1, -1, 2}                                      |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 2}}                                      |
|                 weights => {-2, 1, 1}                                       |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  1  |                             |
|                                    | 0  1  0  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                              |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  0  |                             |
|                                    | 0  1  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 3}}                              |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 1  1  0  |                             |
|                                    | 0  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 2}, {1, 3}}                              |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              }}                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 0  1  0  |                             |
|                                    | 1  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}, {1, 3}}                              |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * subquivers -- return all possible subquivers of a given
    quiver

Functions with optional argument named AsSubquiver :
====================================================

  * subquivers(...,AsSubquiver=>...) (missing documentation)

For the programmer
==================

The object AsSubquiver, is a symbol (Macaulay2Doc).

basisForFlowPolytope -- compute the necessary basis vectors for the hyperplane of a flow polytope
*************************************************************************************************

Synopsis
========

  * Usage:
        basisForFlowPolytope Q
        basisForFlowPolytope (T, Q)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * T, a list (Macaulay2Doc), of edges comprising the spanning
        tree to use to generate the basis.
  * Outputs:
      * B, a matrix (Macaulay2Doc),

Description
===========

The polytope associated to a toric quiver is defined in terms of the stable
spanning trees for that given quiver, and hence its vertices are in a lower
dimensional subspace of the space with dimension $|Q_1|$. Thus a lower
dimensional basis is useful for viewing polytopes in the appropriate dimension.

+----------------------------------------------+
|i1 : basisForFlowPolytope bipartiteQuiver(2,3)|
|                                              |
|o1 = | -1 0  |                                |
|     | 0  -1 |                                |
|     | 1  1  |                                |
|     | 1  0  |                                |
|     | 0  1  |                                |
|     | -1 -1 |                                |
|                                              |
|              6        2                      |
|o1 : Matrix ZZ  <--- ZZ                       |
+----------------------------------------------+
+------------------------------------------------------------+
|i2 : basisForFlowPolytope ({0,1,4,5},  bipartiteQuiver(2,3))|
|                                                            |
|o2 = | 0  1  |                                              |
|     | 1  -1 |                                              |
|     | -1 0  |                                              |
|     | 0  -1 |                                              |
|     | -1 1  |                                              |
|     | 1  0  |                                              |
|                                                            |
|              6        2                                    |
|o2 : Matrix ZZ  <--- ZZ                                     |
+------------------------------------------------------------+

Ways to use basisForFlowPolytope :
==================================

  * "basisForFlowPolytope(List,ToricQuiver)"
  * "basisForFlowPolytope(ToricQuiver)"

For the programmer
==================

The object basisForFlowPolytope, is a method function (Macaulay2Doc).

bipartiteQuiver -- make a toric quiver on underlying bipartite graph
********************************************************************

Synopsis
========

  * Usage:
        bipartiteQuiver (N, M)
  * Inputs:
      * N, an integer (Macaulay2Doc), number of vertices that are
        sources
      * M, an integer (Macaulay2Doc), number of vertices that are
        sinks
  * Optional inputs (Macaulay2Doc),:
      * Flow (missing documentation) => ..., default value "Canonical", specify
        what form of flow to use. This input can be either a string with values
        Canonical or Random, or else a list of integer values.
  * Outputs:
      * Q, an instance of the type ToricQuiver,

Description
===========

This function creates the unique toric quiver whose underlying graph is the
fully connected bipartite graph with N source vertices and M sink vertices.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver (2, 3)                                         |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q = bipartiteQuiver (2, 3, Flow=>"Random")                         |
|                                                                        |
|o2 = ToricQuiver{flow => {24, 65, 71, 72, 19, 19}                      }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-160, -110, 96, 84, 90}                    |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q = bipartiteQuiver (2, 3, Flow=>{1, 2, 1, 3, 1, 4})               |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 2, 1, 3, 1, 4}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-4, -8, 4, 3, 5}                           |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

For the programmer
==================

The object bipartiteQuiver, is a function closure (Macaulay2Doc).

chainQuiver -- make a toric quiver on underlying graph in the form of a chain
*****************************************************************************

Synopsis
========

  * Usage:
        chainQuiver E
  * Inputs:
      * E, a list (Macaulay2Doc), number of edges linking each
        vertex to the next
  * Optional inputs (Macaulay2Doc),:
      * Flow (missing documentation) => ..., default value "Canonical", specify
        what form of flow to use. This input can be either a string with values
        Canonical or Random, or else a list of integer values.
  * Outputs:
      * Q, an instance of the type ToricQuiver,

Description
===========

+------------------------------------------------------------------------+
|i1 : Q = chainQuiver {1,2,3}                                            |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 0  0  0  0  0  |               |
|                                    | 1  -1 -1 0  0  0  |               |
|                                    | 0  1  1  -1 -1 -1 |               |
|                                    | 0  0  0  1  1  1  |               |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 1}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, {2, 3}} |
|                 weights => {-1, -1, -1, 3}                             |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q = chainQuiver ({1,2,3}, Flow=>"Random")                          |
|                                                                        |
|o2 = ToricQuiver{flow => {24, 65, 71, 72, 19, 19}                      }|
|                 IncidenceMatrix => | -1 0  0  0  0  0  |               |
|                                    | 1  -1 -1 0  0  0  |               |
|                                    | 0  1  1  -1 -1 -1 |               |
|                                    | 0  0  0  1  1  1  |               |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 1}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, {2, 3}} |
|                 weights => {-24, -112, 26, 110}                        |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q = chainQuiver ({1,2,3}, Flow=>{1, 2, 1, 3, 1, 4})                |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 2, 1, 3, 1, 4}                            }|
|                 IncidenceMatrix => | -1 0  0  0  0  0  |               |
|                                    | 1  -1 -1 0  0  0  |               |
|                                    | 0  1  1  -1 -1 -1 |               |
|                                    | 0  0  0  1  1  1  |               |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 1}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, {2, 3}} |
|                 weights => {-1, -2, -5, 8}                             |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

For the programmer
==================

The object chainQuiver, is a function closure (Macaulay2Doc).

coneSystem -- compute the chamber decomposition of weights
**********************************************************

Synopsis
========

  * Usage:
        coneSystem Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of Cone instances

Description
===========

The set of weights th for which the polytope (Q,th) is nonempty lies in a fan
CQ. This fan is partitioned into cones by the walls of the toric quiver Q, and
for each partition there exists a unique flow polytope.

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}};                  |
+-----------------------------------------------------------------------------+
|i2 : CS = coneSystem Q                                                       |
|                                                                             |
|o2 = {Cone{...1...}, Cone{...1...}, Cone{...1...}, Cone{...1...},            |
|     ------------------------------------------------------------------------|
|     Cone{...1...}, Cone{...1...}, Cone{...1...}}                            |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object coneSystem, is a function closure (Macaulay2Doc).

Flow
****

Description
===========

optional argument that can be a string with values Canonical, which assigns a
value of 1 to each edge, or Random, which assigns random integer values.

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}),            |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o1 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|Flow=>"Canonical")                                                           |
+-----------------------------------------------------------------------------+
|i2 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{0,0,1,1},{1,1,0,0}}),            |
|                                                                             |
|o2 = ToricQuiver{flow => {24, 65, 71, 72}              }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 0  0  1  1  |                          |
|                                    | 1  1  0  0  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}}                      |
|                 weights => {-232, 143, 89}                                  |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|Flow=>"Random")                                                              |
+-----------------------------------------------------------------------------+

See also
========

  * toricQuiver -- the toricQuiver constructor

Functions with optional argument named Flow :
=============================================

  * bipartiteQuiver(...,Flow=>...) (missing documentation)
  * chainQuiver(...,Flow=>...) (missing documentation)
  * threeVertexQuiver(...,Flow=>...) (missing documentation)
  * toricQuiver(...,Flow=>...) (missing documentation)

For the programmer
==================

The object Flow, is a symbol (Macaulay2Doc).

flowPolytope -- generate the polytope associated to a toric quiver
******************************************************************

Synopsis
========

  * Usage:
        flowPolytope Q
        flowPolytope(W, Q)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * W, a list (Macaulay2Doc), of integer values specifying a
        weight on the vertices
  * Optional inputs (Macaulay2Doc),:
      * Format (missing documentation) => a string (Macaulay2Doc),
        default value "SimplifiedBasis", specifying what
        basis to use. The default value SimplifiedBasis returns the polytope in
        a basis giving the minimal degree necessary for polytope dimension.
  * Outputs:
      * a matrix (Macaulay2Doc), giving the coordinates of the
        vertices defining the flow polytope

Description
===========

Associated to every acyclic toric quiver and weight pair is a flow polytope.
For full-dimensional representation of the vertices, use Format=>"FullBasis".

+---------------------------------------------------------+
|i1 : flowPolytope(bipartiteQuiver(2, 3))                 |
|                                                         |
|o1 = {{-1, 1}, {-1, 0}, {1, -1}, {0, -1}, {1, 0}, {0, 1}}|
|                                                         |
|o1 : List                                                |
+---------------------------------------------------------+
|i2 : flowPolytope({-3,-3,2,2,2}, bipartiteQuiver(2, 3))  |
|                                                         |
|o2 = {{-1, 1}, {-1, 0}, {1, -1}, {0, -1}, {1, 0}, {0, 1}}|
|                                                         |
|o2 : List                                                |
+---------------------------------------------------------+

See also
========

  * basisForFlowPolytope -- compute the necessary
    basis vectors for the hyperplane of a flow polytope

Ways to use flowPolytope :
==========================

  * "flowPolytope(List,ToricQuiver)"
  * "flowPolytope(ToricQuiver)"

For the programmer
==================

The object flowPolytope, is a method function with options (Macaulay2Doc).

incInverse -- compute a flow in the preimage for a given weight
***************************************************************

Synopsis
========

  * Usage:
        incInverse(W, Q)
  * Inputs:
      * W, a list (Macaulay2Doc), of integers, specifying the
        weight on each vertex
      * Q, an instance of the type ToricQuiver,

Description
===========

+-------------------------------------------+
|i1 : Q = toricQuiver(bipartiteQuiver(2,3));|
+-------------------------------------------+
|i2 : th = {-5,-1,2,2,2};                   |
+-------------------------------------------+
|i3 : incInverse(th, Q)                     |
|                                           |
|o3 = {1, 2, 2, 1, 0, 0}                    |
|                                           |
|o3 : List                                  |
+-------------------------------------------+

For the programmer
==================

The object incInverse, is a function closure (Macaulay2Doc).

isAcyclic -- check that a quiver has no cycles
**********************************************

Synopsis
========

  * Usage:
        isAcyclic Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

This method determines whether a quiver is free from oriented cycles.

+-------------------------------------+
|i1 : isAcyclic bipartiteQuiver(2, 3);|
+-------------------------------------+
+-----------------------------------------------------------------------------+
|i2 : isAcyclic toricQuiver matrix({{-1, 1, -1, -1}, {1, -1, 0, 0}, {0, 0, 1, |
|                                                                             |
|o2 = false                                                                   |
|-----------------------------------------------------------------------------|
|1}})                                                                         |
+-----------------------------------------------------------------------------+

Ways to use isAcyclic :
=======================

  * "isAcyclic(ToricQuiver)"
  * isAcyclic(Matrix) (missing documentation)

For the programmer
==================

The object isAcyclic, is a method function (Macaulay2Doc).

isClosedUnderArrows -- is a subquiver closed under arrows?
**********************************************************

Synopsis
========

  * Usage:
        isClosedUnderArrows (V, Q)
        isClosedUnderArrows (M, Q)
        isClosedUnderArrows (SQ, Q)
  * Inputs:
      * M, a matrix (Macaulay2Doc), incidence matrix of subquiver
        to check
      * Q, an instance of the type ToricQuiver,
      * SQ, an instance of the type ToricQuiver, subquiver
        of Q to check
      * V, a list (Macaulay2Doc), set of vertices
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

checks that a set of vertices is closed under arrows with respect to the
toricQuiver Q. That is, for any $v\in V$, then any arrow in $Q_1$ with tail $v$
must have head in $V$ as well. Note that this does not require that $V\subset
Q_0$.

Note also that the attribute closed under arrows relates to the underlying
graph. Arrows with flow of 0 (which occur in cases where using the quiver
subset form: Q^S rather than Q_S) are considered as valid arrows.

+-----------------------------------------------------------+
|i1 : isClosedUnderArrows ({0, 2, 3}, bipartiteQuiver(2, 3))|
|                                                           |
|o1 = false                                                 |
+-----------------------------------------------------------+
|i2 : isClosedUnderArrows ({2, 3, 4}, bipartiteQuiver(2, 3))|
|                                                           |
|o2 = true                                                  |
+-----------------------------------------------------------+
+------------------------------------------------------------------------+
|i3 : Q = threeVertexQuiver {1, 2, 3}                                    |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 weights => {-4, -1, 5}                                 |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i4 : SQ = Q_{0,1}                                                       |
|                                                                        |
|o4 = ToricQuiver{flow => {1, 1}              }                          |
|                 IncidenceMatrix => | -1 -1 |                           |
|                                    | 1  0  |                           |
|                                    | 0  1  |                           |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}}                                 |
|                 weights => {-2, 1, 1}                                  |
|                                                                        |
|o4 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i5 : isClosedUnderArrows (SQ, Q)                                        |
|                                                                        |
|o5 = true                                                               |
+------------------------------------------------------------------------+
+------------------------------------------------------------------------+
|i6 : Q = threeVertexQuiver {1, 2, 3}                                    |
|                                                                        |
|o6 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 weights => {-4, -1, 5}                                 |
|                                                                        |
|o6 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i7 : SQ = Q^{0,1}                                                       |
|                                                                        |
|o7 = ToricQuiver{flow => {1, 1, 0, 0, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 weights => {-2, 1, 1}                                  |
|                                                                        |
|o7 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i8 : isClosedUnderArrows (SQ, Q)                                        |
|                                                                        |
|o8 = true                                                               |
+------------------------------------------------------------------------+

Ways to use isClosedUnderArrows :
=================================

  * "isClosedUnderArrows(List,ToricQuiver)"
  * "isClosedUnderArrows(Matrix,ToricQuiver)"
  * "isClosedUnderArrows(ToricQuiver,ToricQuiver)"
  * isClosedUnderArrows(List,Matrix) (missing documentation)
  * isClosedUnderArrows(Matrix,List) (missing documentation)

For the programmer
==================

The object isClosedUnderArrows, is a method function (Macaulay2Doc).

isSemistable -- determines if a subquiver is semistable with respect to a given weight
**************************************************************************************

Synopsis
========

  * Usage:
        isSemistable (L, Q)
        isSemistable (sQ, Q)
  * Inputs:
      * L, a list (Macaulay2Doc), of the indices of arrows in Q
        that make up the subquiver in question
      * Q, an instance of the type ToricQuiver,
      * SQ, an instance of the type ToricQuiver, A
        subquiver of the quiver Q
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

This function determines if a given subquiver is semi-stable with respect to
the weight saved on Q. A subquiver SQ of the quiver Q is semistable if for
every subset V of the vertices of Q that is also SQ-successor closed, the sum
of the weights associated to V is nonnegative.

+-------------------------------------------------+
|i1 : isSemistable ({0, 1}, bipartiteQuiver(2, 3))|
|                                                 |
|o1 = false                                       |
+-------------------------------------------------+
+------------------------------------------------------------------------+
|i2 : Q = bipartiteQuiver(2, 3);                                         |
+------------------------------------------------------------------------+
|i3 : S = first(subquivers(Q, Format=>"quiver", AsSubquiver=>true))      |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 0, 0, 0, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-1, 0, 1, 0, 0}                            |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i4 : isSemistable (S, Q)                                                |
|                                                                        |
|o4 = false                                                              |
+------------------------------------------------------------------------+

Ways to use isSemistable :
==========================

  * "isSemistable(List,ToricQuiver)"
  * "isSemistable(ToricQuiver,ToricQuiver)"

For the programmer
==================

The object isSemistable, is a method function (Macaulay2Doc).

isStable -- determines if a subquiver is semistable with respect to a given weight
**********************************************************************************

Synopsis
========

  * Usage:
        isStable (L, Q)
        isStable (SQ, Q)
  * Inputs:
      * L, a list (Macaulay2Doc), of the indices of arrows in Q
        that make up the subquiver in question
      * Q, an instance of the type ToricQuiver,
      * SQ, an instance of the type ToricQuiver, A
        subquiver of the quiver Q
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

This function determines if a given subquiver is stable with respect to the
weight saved on Q. A subquiver SQ of the quiver Q is stable if for every subset
V of the vertices of Q that is also SQ-successor closed, the sum of the weights
associated to V is positive.

+-------------------------------+
|i1 : Q = bipartiteQuiver(2, 3);|
+-------------------------------+
|i2 : P = Q^{0,1,4,5};          |
+-------------------------------+
|i3 : isStable(P, Q)            |
|                               |
|o3 = true                      |
+-------------------------------+
+---------------------------------------------+
|i4 : isStable ({0, 1}, bipartiteQuiver(2, 3))|
|                                             |
|o4 = false                                   |
+---------------------------------------------+
+------------------------------------------------------------------------+
|i5 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o5 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o5 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i6 : S = first(subquivers(Q, Format=>"quiver", AsSubquiver=>true))      |
|                                                                        |
|o6 = ToricQuiver{flow => {1, 0, 0, 0, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-1, 0, 1, 0, 0}                            |
|                                                                        |
|o6 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i7 : isStable (S, Q)                                                    |
|                                                                        |
|o7 = false                                                              |
+------------------------------------------------------------------------+

Ways to use isStable :
======================

  * "isStable(List,ToricQuiver)"
  * "isStable(ToricQuiver,ToricQuiver)"

For the programmer
==================

The object isStable, is a method function (Macaulay2Doc).

isTight -- determine if toric quiver is tight
*********************************************

Synopsis
========

  * Usage:
        isTight Q
        isTight(Q, W)
        isTight(W, Q)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * W, a list (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Format (missing documentation) => ..., default value "Flow", specify
        whether input W is a flow (integer values associated to each arrow) or
        the image of the flow under the map theta (integer values associated to
        each vertex).
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

A toric quiver $Q$ is tight with respect to a given flow if there is no maximal
unstable subquiver of codimension 1. That is, every unstable subquiver of $Q$
has at most $|Q_1|-2$ arrows. This method determines if a toric quiver $Q$ is
tight with respect to the vertex weights induced by its flow.

+----------------------------------+
|i1 : isTight bipartiteQuiver(2, 3)|
|                                  |
|o1 = true                         |
+----------------------------------+
+--------------------------------------------------+
|i2 : isTight bipartiteQuiver(2, 3, Flow=>"Random")|
|                                                  |
|o2 = true                                         |
+--------------------------------------------------+
+---------------------------------------------------+
|i3 : isTight (bipartiteQuiver(2, 3), {2,1,2,3,2,3})|
|                                                   |
|o3 = true                                          |
+---------------------------------------------------+
+---------------------------------------------------+
|i4 : isTight ({2,1,2,3,2,3}, bipartiteQuiver(2, 3))|
|                                                   |
|o4 = true                                          |
+---------------------------------------------------+

Ways to use isTight :
=====================

  * "isTight(List,ToricQuiver)"
  * "isTight(ToricQuiver)"
  * "isTight(ToricQuiver,List)"

For the programmer
==================

The object isTight, is a method function with options (Macaulay2Doc).

makeTight -- return a tight quiver with the same flow polytope
**************************************************************

Synopsis
========

  * Usage:
        makeTight(W, Q)
  * Inputs:
      * W, a list (Macaulay2Doc), of values corresponding to a
        weight on each arrow of Q
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * Q, an instance of the type ToricQuiver, that is
        tight with respect to the flow on the input, and which has the same
        flow polytope as the input.

Description
===========

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2,3)                                           |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : w = {-5,-1,2,2,2}                                                  |
|                                                                        |
|o2 = {-5, -1, 2, 2, 2}                                                  |
|                                                                        |
|o2 : List                                                               |
+------------------------------------------------------------------------+
|i3 : makeTight(w, Q)                                                    |
|                                                                        |
|o3 = ToricQuiver{flow => {-1, 1, 1}             }                       |
|                 IncidenceMatrix => | 1  1  1  |                        |
|                                    | -1 -1 -1 |                        |
|                 Q0 => {0, 1}                                           |
|                 Q1 => {{1, 0}, {1, 0}, {1, 0}}                         |
|                 weights => {1, -1}                                     |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

For the programmer
==================

The object makeTight, is a function closure (Macaulay2Doc).

maxCodimensionUnstable -- compute the maximal codimension of the unstable loci of a quiver
******************************************************************************************

Synopsis
========

  * Usage:
        maxCodimensionUnstable Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

computes the maximal codimension of the unstable loci a given quiver Q

+-------------------------------------------------+
|i1 : maxCodimensionUnstable bipartiteQuiver(2, 3)|
|                                                 |
|o1 = 6                                           |
+-------------------------------------------------+

Ways to use maxCodimensionUnstable :
====================================

  * "maxCodimensionUnstable(ToricQuiver)"

For the programmer
==================

The object maxCodimensionUnstable, is a
method function (Macaulay2Doc).

maximalNonstableSubquivers -- return the maximal subquivers that are semistable
*******************************************************************************

Synopsis
========

  * Usage:
        maximalNonstableSubquivers Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * ReturnSingletons (missing documentation) => a Boolean value (Macaulay2Doc),
        default value false, Whether or not to return
        singleton vertices subquivers
      * Format (missing documentation) => a string (Macaulay2Doc),
        default value "list", format for representing
        the subquivers
  * Outputs:
      * L, a hash table (Macaulay2Doc), consisting of two
        keys: Nonsingletons and Singletons

Description
===========

this routine takes all of the possible subquivers of a given quiver Q and
returns those that are not stable, and which are maximal with respect to the
weight on the quiver Q

Subquivers are represented by lists of arrows, except in the case of subquivers
that consist of singleton vertices.

+-----------------------------------------------------------------------------+
|i1 : maximalNonstableSubquivers bipartiteQuiver (2, 3)                       |
|                                                                             |
|o1 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5},   |
|                                                                             |
|o1 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|{0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                   |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object maximalNonstableSubquivers, is a
function closure (Macaulay2Doc).

maximalUnstableSubquivers -- return the maximal subquivers that are unstable
****************************************************************************

Synopsis
========

  * Usage:
        maximalUnstableSubquivers Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * ReturnSingletons (missing documentation) => a Boolean value (Macaulay2Doc),
        default value false, Whether or not to return
        singleton vertices subquivers
      * Format (missing documentation) => a string (Macaulay2Doc),
        default value "list", format for representing
        the subquivers
  * Outputs:
      * L, a hash table (Macaulay2Doc), consisting of two
        keys: Nonsingletons and Singletons

Description
===========

this routine takes all of the possible subquivers of a given quiver Q and
returns those that are both unstable and maximal with respect to the weight on
the quiver Q

Subquivers are represented by lists of arrows, except in the case of subquivers
that consist of singleton vertices.

+-----------------------------------------------------------------------------+
|i1 : maximalUnstableSubquivers bipartiteQuiver (2, 3)                        |
|                                                                             |
|o1 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5},   |
|                                                                             |
|o1 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|{0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                   |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object maximalUnstableSubquivers, is a
function closure (Macaulay2Doc).

mergeOnArrow -- join two quivers together by identifying an arrow from each
***************************************************************************

Synopsis
========

  * Usage:
        mergeOnArrow (Q1, A1, Q2, A2)
        mergeOnArrow (Q1, A1, M2, A2)
        mergeOnArrow (M1, A1, Q2, A2)
  * Inputs:
      * A1, an integer (Macaulay2Doc),
      * A2, an integer (Macaulay2Doc),
      * M1, a matrix (Macaulay2Doc),
      * M2, a matrix (Macaulay2Doc),
      * Q1, an instance of the type ToricQuiver,
      * Q2, an instance of the type ToricQuiver,
  * Outputs:
      * an instance of the type ToricQuiver,

Description
===========

create a new quiver from joining two toricQuivers together by identifying arrow
$A1$ in $Q1$ with arrow $A2$ in $Q2$.

+-----------------------------------------------------------------------------+
|i1 : mergeOnArrow (bipartiteQuiver (2, 3), 0, bipartiteQuiver (2, 3), 0)     |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                   |
|                 IncidenceMatrix => | 0  1  0  0  1  0  0  0  0  0  0  |     |
|                                    | 0  0  -1 -1 -1 0  0  0  0  0  0  |     |
|                                    | 1  0  0  1  0  0  0  0  0  0  0  |     |
|                                    | -1 -1 0  0  0  -1 -1 -1 0  0  0  |     |
|                                    | 0  0  1  0  0  1  0  0  1  0  0  |     |
|                                    | 0  0  0  0  0  0  0  1  0  0  1  |     |
|                                    | 0  0  0  0  0  0  0  0  -1 -1 -1 |     |
|                                    | 0  0  0  0  0  0  1  0  0  1  0  |     |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6, 7}                              |
|                 Q1 => {{3, 2}, {3, 0}, {1, 4}, {1, 2}, {1, 0}, {3, 4}, {3,  |
|                 weights => {2, -3, 2, -5, 3, 2, -3, 2}                      |
|                                                                             |
|o1 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|                                   }                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|7}, {3, 5}, {6, 4}, {6, 7}, {6, 5}}                                          |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i2 : mergeOnArrow (bipartiteQuiver (2, 3), 0, matrix({{-1,-1,-1,-1},{1,1,0,0 |
|                                                                             |
|o2 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1}                         |
|                 IncidenceMatrix => | 0  1  0  0  1  0  0  0  0  |           |
|                                    | 0  0  -1 -1 -1 0  0  0  0  |           |
|                                    | 1  0  0  1  0  0  0  0  0  |           |
|                                    | -1 -1 0  0  0  -1 -1 -1 -1 |           |
|                                    | 0  0  1  0  0  1  1  0  0  |           |
|                                    | 0  0  0  0  0  0  0  1  1  |           |
|                 Q0 => {0, 1, 2, 3, 4, 5}                                    |
|                 Q1 => {{3, 2}, {3, 0}, {1, 4}, {1, 2}, {1, 0}, {3, 4}, {3,  |
|                 weights => {2, -3, 2, -6, 3, 2}                             |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|},{0,0,1,1}}), 0)                                                            |
|                                                                             |
|                   }                                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|4}, {3, 5}, {3, 5}}                                                          |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i3 : mergeOnArrow (matrix ({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), 0,          |
|                                                                             |
|o3 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1}                         |
|                 IncidenceMatrix => | 0  1  1  0  0  0  0  0  0  |           |
|                                    | -1 -1 -1 -1 -1 -1 0  0  0  |           |
|                                    | 1  0  0  1  0  0  1  0  0  |           |
|                                    | 0  0  0  0  0  1  0  0  1  |           |
|                                    | 0  0  0  0  0  0  -1 -1 -1 |           |
|                                    | 0  0  0  0  1  0  0  1  0  |           |
|                 Q0 => {0, 1, 2, 3, 4, 5}                                    |
|                 Q1 => {{1, 2}, {1, 0}, {1, 0}, {1, 2}, {1, 5}, {1,          |
|                 weights => {2, -6, 3, 2, -3, 2}                             |
|                                                                             |
|o3 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|bipartiteQuiver (2, 3), 0)                                                   |
|                                                                             |
|                           }                                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|3}, {4, 2}, {4, 5}, {4, 3}}                                                  |
+-----------------------------------------------------------------------------+

Ways to use mergeOnArrow :
==========================

  * "mergeOnArrow(Matrix,ZZ,ToricQuiver,ZZ)"
  * "mergeOnArrow(ToricQuiver,ZZ,Matrix,ZZ)"
  * "mergeOnArrow(ToricQuiver,ZZ,ToricQuiver,ZZ)"
  * mergeOnArrow(Matrix,ZZ,Matrix,ZZ) (missing documentation)

For the programmer
==================

The object mergeOnArrow, is a method function (Macaulay2Doc).

mergeOnVertex -- join two quivers together by identifying a vertex from each
****************************************************************************

Synopsis
========

  * Usage:
        mergeOnVertex (Q1, V1, Q2, V2)
        mergeOnVertex (Q1, V1, M2, V2)
        mergeOnVertex (M1, V1, Q2, V2)
  * Inputs:
      * M1, a matrix (Macaulay2Doc),
      * M2, a matrix (Macaulay2Doc),
      * Q1, an instance of the type ToricQuiver,
      * Q2, an instance of the type ToricQuiver,
      * V1, an integer (Macaulay2Doc),
      * V2, an integer (Macaulay2Doc),
  * Outputs:
      * an instance of the type ToricQuiver,

Description
===========

create a new quiver from joining two toricQuivers together by identifying
vertex $V1$ in $Q1$ with vertex $V2$ in $Q2$.

+-----------------------------------------------------------------------------+
|i1 : mergeOnVertex (bipartiteQuiver (2, 3), 1, bipartiteQuiver (2, 3), 0)    |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  0  0  0  0  0  0  |  |
|                                    | 1  0  0  1  0  0  0  0  0  0  0  0  |  |
|                                    | 0  1  0  0  1  0  0  0  0  0  0  0  |  |
|                                    | 0  0  1  0  0  1  0  0  0  0  0  0  |  |
|                                    | 0  0  0  -1 -1 -1 -1 -1 -1 0  0  0  |  |
|                                    | 0  0  0  0  0  0  0  0  0  -1 -1 -1 |  |
|                                    | 0  0  0  0  0  0  1  0  0  1  0  0  |  |
|                                    | 0  0  0  0  0  0  0  1  0  0  1  0  |  |
|                                    | 0  0  0  0  0  0  0  0  1  0  0  1  |  |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6, 7, 8}                           |
|                 Q1 => {{0, 1}, {0, 2}, {0, 3}, {4, 1}, {4, 2}, {4, 3}, {4,  |
|                 weights => {-3, 2, 2, 2, -6, -3, 2, 2, 2}                   |
|                                                                             |
|o1 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|                                           }                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|6}, {4, 7}, {4, 8}, {5, 6}, {5, 7}, {5, 8}}                                  |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i2 : mergeOnVertex (bipartiteQuiver (2, 3), 1, matrix({{-1,-1,-1,-1},{1,1,0,0|
|                                                                             |
|o2 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                      |
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  0  0  0  0  |        |
|                                    | 1  0  0  1  0  0  0  0  0  0  |        |
|                                    | 0  1  0  0  1  0  0  0  0  0  |        |
|                                    | 0  0  1  0  0  1  0  0  0  0  |        |
|                                    | 0  0  0  -1 -1 -1 -1 -1 -1 -1 |        |
|                                    | 0  0  0  0  0  0  1  1  0  0  |        |
|                                    | 0  0  0  0  0  0  0  0  1  1  |        |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6}                                 |
|                 Q1 => {{0, 1}, {0, 2}, {0, 3}, {4, 1}, {4, 2}, {4, 3}, {4, 5|
|                 weights => {-3, 2, 2, 2, -7, 2, 2}                          |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|},{0,0,1,1}}), 0)                                                            |
|                                                                             |
|                          }                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|}, {4, 5}, {4, 6}, {4, 6}}                                                   |
+-----------------------------------------------------------------------------+
|i3 : mergeOnVertex (matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), 1,          |
|                                                                             |
|o3 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}                      |
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  0  0  0  0           |
|                                    | 0  0  1  1  0  0  0  0  0  0           |
|                                    | 1  1  0  0  -1 -1 -1 0  0  0           |
|                                    | 0  0  0  0  0  0  0  -1 -1 -1          |
|                                    | 0  0  0  0  1  0  0  1  0  0           |
|                                    | 0  0  0  0  0  1  0  0  1  0           |
|                                    | 0  0  0  0  0  0  1  0  0  1           |
|                 Q0 => {0, 1, 2, 3, 4, 5, 6}                                 |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}, {2, 4}, {2,          |
|                 weights => {-4, 2, -1, -3, 2, 2, 2}                         |
|                                                                             |
|o3 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|bipartiteQuiver (2, 3), 0)                                                   |
|                                                                             |
|                                   }                                         |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
||                                                                            |
|                                                                             |
|5}, {2, 6}, {3, 4}, {3, 5}, {3, 6}}                                          |
+-----------------------------------------------------------------------------+

Ways to use mergeOnVertex :
===========================

  * "mergeOnVertex(Matrix,ZZ,ToricQuiver,ZZ)"
  * "mergeOnVertex(ToricQuiver,ZZ,Matrix,ZZ)"
  * "mergeOnVertex(ToricQuiver,ZZ,ToricQuiver,ZZ)"
  * mergeOnVertex(Matrix,ZZ,Matrix,ZZ) (missing documentation)

For the programmer
==================

The object mergeOnVertex, is a method function (Macaulay2Doc).

potentialWalls -- return the potential walls in the weight chamber decomposition for a given quiver
***************************************************************************************************

Synopsis
========

  * Usage:
        potentialWalls Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

every wall can be represented uniquely by a partition of the vertices Q0 of Q
into two sets Qplus and Qminus. As a partition can be expressed in terms of
only one of the subsets, only one of the two sets Qplus and Qminus is used in
every case. Thus we denote the wall W by the subset of vertices Qplus used for
defining it.

+-----------------------------------------------------------------------------+
|i1 : potentialWalls toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}        |
|                                                                             |
|o1 = {Wall{Qplus => {1, 2, 3}}, Wall{Qplus => {0, 2, 3}}, Wall{Qplus =>      |
|           WallType => (0, 3)        WallType => (1, 2)        WallType      |
|     ------------------------------------------------------------------------|
|     {0, 1, 3}}, Wall{Qplus => {0, 1, 2}}, Wall{Qplus => {2, 3}   },         |
|     => (2, 1)        WallType => (3, 0)        WallType => (0, 4)           |
|     ------------------------------------------------------------------------|
|     Wall{Qplus => {1, 3}   }, Wall{Qplus => {0, 3}   }}                     |
|          WallType => (1, 3)        WallType => (2, 2)                       |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use potentialWalls :
============================

  * "potentialWalls(ToricQuiver)"
  * potentialWalls(Matrix) (missing documentation)

For the programmer
==================

The object potentialWalls, is a method function (Macaulay2Doc).

primitiveArrows -- list the primitive arrows in a quiver
********************************************************

Synopsis
========

  * Usage:
        primitiveArrows Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of arrow indices corresponding to
        the primitive arrows in Q

Description
===========

an arrow a=(v0,v1) in Q.Q1 is primitive if there exists an oriented path from
v0 to v1 in Q.Q1.

+----------------------------------------------------------------------+
|i1 : primitiveArrows toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}}|
|                                                                      |
|o1 = {0, 3, 5}                                                        |
|                                                                      |
|o1 : List                                                             |
+----------------------------------------------------------------------+

For the programmer
==================

The object primitiveArrows, is a function closure (Macaulay2Doc).

quiverEdges -- return the graph edges associated to the toric quiver
********************************************************************

Synopsis
========

  * Usage:
        quiverEdges Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,

See also
========

  * ToricQuiver -- the ToricQuiver datatype

For the programmer
==================

The object quiverEdges, is a function closure (Macaulay2Doc).

quiverFlow -- return the flow attribute associated to the toric quiver
**********************************************************************

Synopsis
========

  * Usage:
        quiverFlow Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,

See also
========

  * ToricQuiver -- the ToricQuiver datatype

For the programmer
==================

The object quiverFlow, is a function closure (Macaulay2Doc).

quiverIncidenceMatrix -- return the graph incidence matrix attribute associated to the toric quiver
***************************************************************************************************

Synopsis
========

  * Usage:
        quiverIncidenceMatrix Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,

See also
========

  * ToricQuiver -- the ToricQuiver datatype

For the programmer
==================

The object quiverIncidenceMatrix, is a
function closure (Macaulay2Doc).

quiverWeights -- return the weight attribute associated to the toric quiver
***************************************************************************

Synopsis
========

  * Usage:
        quiverWeights Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,

See also
========

  * ToricQuiver -- the ToricQuiver datatype

For the programmer
==================

The object quiverWeights, is a function closure (Macaulay2Doc).

referenceThetas -- return a weight for all polytopes associated to a toric quiver
*********************************************************************************

Synopsis
========

  * Usage:
        referenceThetas QCS
  * Inputs:
      * QCS, a list (Macaulay2Doc), of cones comprising the chamber
        decomposition for weights
  * Outputs:
      * L, a list (Macaulay2Doc), of weights

Description
===========

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}};                  |
+-----------------------------------------------------------------------------+
|i2 : CS = coneSystem Q;                                                      |
+-----------------------------------------------------------------------------+
|i3 : referenceThetas CS                                                      |
|                                                                             |
|o3 = {{-1, -1, -1, 3}, {-2, 1, -1, 2}, {-3, 1, 1, 1}, {-2, -2, 1, 3}, {-3,   |
|     ------------------------------------------------------------------------|
|     -1, 2, 2}, {-1, -3, 2, 2}, {-2, -2, 3, 1}}                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object referenceThetas, is a function closure (Macaulay2Doc).

ReturnSingletons
****************

Description
===========

optional argument to consider single vertices as subquivers. For most
computations, these subquivers are trivial, and are ignored.

+-----------------------------------------------------------------------------+
|i1 : maximalNonstableSubquivers(bipartiteQuiver (2, 3), ReturnSingletons=>   |
|                                                                             |
|o1 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5},   |
|               Singletons => {{0}, {1}}                                      |
|                                                                             |
|o1 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|true)                                                                        |
|                                                                             |
| {0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                  |
+-----------------------------------------------------------------------------+
|i2 : maximalNonstableSubquivers(bipartiteQuiver (2, 3), ReturnSingletons=>   |
|                                                                             |
|o2 = HashTable{NonSingletons => {{0, 1, 2, 3}, {0, 1, 2, 4}, {0, 1, 2, 5},   |
|                                                                             |
|o2 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|false)                                                                       |
|                                                                             |
| {0, 3, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}}}                                  |
+-----------------------------------------------------------------------------+

See also
========

  * maximalNonstableSubquivers -- return the
    maximal subquivers that are semistable
  * maximalUnstableSubquivers -- return the
    maximal subquivers that are unstable

Functions with optional argument named ReturnSingletons :
=========================================================

  * maximalNonstableSubquivers(...,ReturnSingletons=>...) (missing
    documentation)
  * maximalUnstableSubquivers(...,ReturnSingletons=>...) (missing
    documentation)

For the programmer
==================

The object ReturnSingletons, is a symbol (Macaulay2Doc).

sameChamber -- determine if two weights lie in the same chamber
***************************************************************

Synopsis
========

  * Usage:
        sameChamber(Th1, Th2, TQ)
  * Inputs:
      * Th1, a list (Macaulay2Doc),
      * Th1, a list (Macaulay2Doc),
      * TQ, an instance of the type ToricQuiver,

Description
===========

This function returns either a boolean value of true or else a string
describing why the outcome cannot be determined. It requires that polytopes be
smooth and that the set of stable trees for both weights be nonempty.

+------------------------------------------------------------+
|i1 : Q = toricQuiver({{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}});|
+------------------------------------------------------------+
|i2 : sameChamber({-3,2,-1,2},{-2,1,-2,3}, Q)                |
|                                                            |
|o2 = true                                                   |
+------------------------------------------------------------+

For the programmer
==================

The object sameChamber, is a function closure (Macaulay2Doc).

stableTrees -- return the spanning trees that are stable
********************************************************

Synopsis
========

  * Usage:
        stableTrees(th, Q)
  * Inputs:
      * th, a list (Macaulay2Doc), of weights corresponding to each
        vertex
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of lists, each representing the
        arrows that comprise a spanning tree that is stable with respect to the
        weight th

Description
===========

+-----------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2,3);                                               |
+-----------------------------------------------------------------------------+
|i2 : th = {-3,-3,2,2,2};                                                     |
+-----------------------------------------------------------------------------+
|i3 : stableTrees(th, Q)                                                      |
|                                                                             |
|o3 = {{0, 2, 4, 5}, {0, 1, 4, 5}, {1, 2, 3, 5}, {0, 1, 3, 5}, {1, 2, 3, 4},  |
|     ------------------------------------------------------------------------|
|     {0, 2, 3, 4}}                                                           |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

For the programmer
==================

The object stableTrees, is a function closure (Macaulay2Doc).

subquiver representation
************************

There are many ways to take a subset $R=(R_0,R_1)$ of a quiver $Q=(Q_0,Q_1)$.
This is because we can consider $R_0\subset Q_0$ and $R_1\subset Q_1$.
Alternatively, $R$ is itself a quiver, with $|R_1|$ arrows and $|R_0|$
vertices. Thus we can also consider $R$ independently of the arrow/vertex
labeling of $Q$.

The two methods corresponding to these ideas are referenced in the examples
below.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q_{0,1,3}                                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 1}              }                       |
|                 IncidenceMatrix => | -1 -1 0  |                        |
|                                    | 0  0  -1 |                        |
|                                    | 1  0  1  |                        |
|                                    | 0  1  0  |                        |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                         |
|                 weights => {-2, -1, 2, 1}                              |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q^{0,1,3}                                                          |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 1, 0, 1, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-2, -1, 2, 1, 0}                           |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * ToricQuiver ^ List -- taking a subquiver by
    indexing
  * ToricQuiver _ List -- taking a subquiver by
    indexing

subquivers -- return all possible subquivers of a given quiver
**************************************************************

Synopsis
========

  * Usage:
        subquivers Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * Format (missing documentation) => a string (Macaulay2Doc),
        default value "quiver", options include quiver,
        which returns a list of quivers, and list, which returns a list of
        arrows for each subquiver
      * AsSubquiver (missing documentation) => a Boolean value (Macaulay2Doc),
        default value false, if Format is specified as
        quiver, then applying AsSubquiver = true insures that the matrix
        representation of the subquiver is the same size as the matrix original
        quiver
  * Outputs:
      * L, a list (Macaulay2Doc), of either quiver objects, or
        arrow indices

Description
===========

this returns the subquivers of a given quiver. There are 3 main ways to
represent a subquiver:

  * as a list of arrow indices,
  * as a subset of rows and columns of the original incidence matrix, and
  * as a copy of the original incidence matrix with certain rows and columns
    zeroed out.

+-----------------------------------------------------------------------------+
|i1 : Q = chainQuiver {2}                                                     |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1}              }                               |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}, {0, 1}}                                      |
|                 weights => {-2, 2}                                          |
|                                                                             |
|o1 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i2 : subquivers Q                                                            |
|                                                                             |
|o2 = {ToricQuiver{flow => {1}              }, ToricQuiver{flow => {1}        |
|                  IncidenceMatrix => | -1 |               IncidenceMatrix => |
|                                     | 1  |                                  |
|                  Q0 => {0, 1}                            Q0 => {0, 1}       |
|                  Q1 => {{0, 1}}                          Q1 => {{0, 1}}     |
|                  weights => {-1, 1}                      weights => {-1, 1} |
|     ------------------------------------------------------------------------|
|           }}                                                                |
|     | -1 |                                                                  |
|     | 1  |                                                                  |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+
|i3 : subquivers(Q, Format=>"list")                                           |
|                                                                             |
|o3 = {{0}, {1}}                                                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
|i4 : subquivers bipartiteQuiver(2, 2)                                        |
|                                                                             |
|o4 = {ToricQuiver{flow => {1}              }, ToricQuiver{flow => {1}        |
|                  IncidenceMatrix => | -1 |               IncidenceMatrix => |
|                                     | 1  |                                  |
|                  Q0 => {0, 1}                            Q0 => {0, 1}       |
|                  Q1 => {{0, 1}}                          Q1 => {{0, 1}}     |
|                  weights => {-1, 1}                      weights => {-1, 1} |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|           }, ToricQuiver{flow => {1}              },                        |
|     | -1 |               IncidenceMatrix => | -1 |                          |
|     | 1  |                                  | 1  |                          |
|                          Q0 => {0, 1}                                       |
|                          Q1 => {{0, 1}}                                     |
|                          weights => {-1, 1}                                 |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1}              }, ToricQuiver{flow => {1, 1}      |
|                 IncidenceMatrix => | -1 |               IncidenceMatrix =>  |
|                                    | 1  |                                   |
|                 Q0 => {0, 1}                                                |
|                 Q1 => {{0, 1}}                          Q0 => {0, 1, 2}     |
|                 weights => {-1, 1}                      Q1 => {{0, 1}, {0,  |
|                                                         weights => {-2, 1,  |
|                                                                             |
|     ------------------------------------------------------------------------|
|              }, ToricQuiver{flow => {1, 1}              },                  |
|     | -1 -1 |               IncidenceMatrix => | -1 0  |                    |
|     | 1  0  |                                  | 0  -1 |                    |
|     | 0  1  |                                  | 1  1  |                    |
|                             Q0 => {0, 1, 2}                                 |
|     2}}                     Q1 => {{0, 2}, {1, 2}}                          |
|     1}                      weights => {-1, -1, 2}                          |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 0  1  |                                |
|                                    | 1  0  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}}                                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 3}}                                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 0  |                                |
|                                    | 0  -1 |                                |
|                                    | 1  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {1, 2}}                                      |
|                 weights => {-1, -1, 2}                                      |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1}              },                              |
|                 IncidenceMatrix => | -1 -1 |                                |
|                                    | 1  0  |                                |
|                                    | 0  1  |                                |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 2}}                                      |
|                 weights => {-2, 1, 1}                                       |
|                                                                             |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  1  |                             |
|                                    | 0  1  0  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                              |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 -1 0  |                             |
|                                    | 0  0  -1 |                             |
|                                    | 1  0  0  |                             |
|                                    | 0  1  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 3}}                              |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              },                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 1  1  0  |                             |
|                                    | 0  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {1, 2}, {1, 3}}                              |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1}              }}                           |
|                 IncidenceMatrix => | -1 0  0  |                             |
|                                    | 0  -1 -1 |                             |
|                                    | 0  1  0  |                             |
|                                    | 1  0  1  |                             |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 3}, {1, 2}, {1, 3}}                              |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : subquivers(bipartiteQuiver(2, 2), Format=>"list")                       |
|                                                                             |
|o5 = {{0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {1, 2}, {0, 3}, {1, 3}, {2, 3}, {0,|
|     ------------------------------------------------------------------------|
|     1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}}                                 |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : subquivers(bipartiteQuiver(2, 2), Format=>"quiver", AsSubquiver=>true)  |
|                                                                             |
|o6 = {ToricQuiver{flow => {1, 0, 0, 0}                  },                   |
|                  IncidenceMatrix => | -1 -1 0  0  |                         |
|                                     | 0  0  -1 -1 |                         |
|                                     | 1  0  1  0  |                         |
|                                     | 0  1  0  1  |                         |
|                  Q0 => {0, 1, 2, 3}                                         |
|                  Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                     |
|                  weights => {-1, 0, 1, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, 0, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {0, -1, 1, 0}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {0, -1, 0, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-2, 0, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 2, 0}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 1, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -1, 0, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {0, -2, 1, 1}                                    |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 1, 0}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-2, -1, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 1, 0, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-2, -1, 1, 2}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {1, 0, 1, 1}                  },                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -2, 2, 1}                                   |
|     ------------------------------------------------------------------------|
|     ToricQuiver{flow => {0, 1, 1, 1}                  }}                    |
|                 IncidenceMatrix => | -1 -1 0  0  |                          |
|                                    | 0  0  -1 -1 |                          |
|                                    | 1  0  1  0  |                          |
|                                    | 0  1  0  1  |                          |
|                 Q0 => {0, 1, 2, 3}                                          |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                      |
|                 weights => {-1, -2, 1, 2}                                   |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use subquivers :
========================

  * "subquivers(ToricQuiver)"
  * subquivers(Matrix) (missing documentation)

For the programmer
==================

The object subquivers, is a method function with options (Macaulay2Doc).

theta -- image of the flow on the vertices
******************************************

Synopsis
========

  * Usage:
        theta Q
  * Inputs:
      * Q, an instance of the type ToricQuiver,
  * Outputs:
      * L, a list (Macaulay2Doc), of integers

Description
===========

this is the image of the $Inc$ map

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3, Flow=>"Random")                          |
|                                                                        |
|o1 = ToricQuiver{flow => {24, 65, 71, 72, 19, 19}                      }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-160, -110, 96, 84, 90}                    |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : theta Q                                                            |
|                                                                        |
|o2 = {-160, -110, 96, 84, 90}                                           |
|                                                                        |
|o2 : List                                                               |
+------------------------------------------------------------------------+

Ways to use theta :
===================

  * "theta(ToricQuiver)"
  * theta(Matrix) (missing documentation)

For the programmer
==================

The object theta, is a method function (Macaulay2Doc).

threeVertexQuiver -- make a toric quiver on underlying graph with three vertices and a specified number of edges between each
*****************************************************************************************************************************

Synopsis
========

  * Usage:
        threeVertexQuiver E
  * Inputs:
      * E, a list (Macaulay2Doc), number of edges between each pair
        of vertices
  * Optional inputs (Macaulay2Doc),:
      * Flow (missing documentation) => ..., default value "Canonical", specify
        what form of flow to use. This input can be either a string with values
        Canonical or Random, or else a list of integer values.
  * Outputs:
      * Q, an instance of the type ToricQuiver,

Description
===========

+------------------------------------------------------------------------+
|i1 : Q = threeVertexQuiver {1,2,3}                                      |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 weights => {-4, -1, 5}                                 |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q = threeVertexQuiver ({1,2,3}, Flow=>"Random")                    |
|                                                                        |
|o2 = ToricQuiver{flow => {24, 65, 71, 72, 19, 19}                      }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 weights => {-232, -14, 246}                            |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q = threeVertexQuiver ({1,2,3}, Flow=>{1, 2, 1, 3, 1, 4})          |
|                                                                        |
|o3 = ToricQuiver{flow => {1, 2, 1, 3, 1, 4}                            }|
|                 IncidenceMatrix => | -1 -1 -1 -1 0  0  |               |
|                                    | 1  0  0  0  -1 -1 |               |
|                                    | 0  1  1  1  1  1  |               |
|                 Q0 => {0, 1, 2}                                        |
|                 Q1 => {{0, 1}, {0, 2}, {0, 2}, {0, 2}, {1, 2}, {1, 2}} |
|                 weights => {-7, -4, 11}                                |
|                                                                        |
|o3 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

For the programmer
==================

The object threeVertexQuiver, is a function closure (Macaulay2Doc).

toric quiver representation
***************************

toric quivers are represented as a type of HashTable with the following keys:

  * IncidenceMatrix: weighted incidence matrix giving the vertex-edge
    connectivity structure of $Q$
  * Q0: list of vertices
  * Q1: list of edges
  * flow: list of integers giving the flow on each edge
  * weights: induced weights on vertices given by the image of the flow

One can generate the quiver Q associated to the bipartite graph K_{2,3} with a
random flow w as follows:

+------------------------------------------------------------------------+
|i1 : Q0 = {{0,2},{0,3},{0,4},{1,2},{1,3},{1,4}}                         |
|                                                                        |
|o1 = {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}}                   |
|                                                                        |
|o1 : List                                                               |
+------------------------------------------------------------------------+
|i2 : Q = toricQuiver(Q0, Flow=>"Random")                                |
|                                                                        |
|o2 = ToricQuiver{flow => {24, 65, 71, 72, 19, 19}                      }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-160, -110, 96, 84, 90}                    |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

Alternatively, one can construct a toric quiver using any of the following
constructions:

create a toric quiver from matrix

+----------------------------------------------------------------+
|i3 : Q = toricQuiver matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}})|
|                                                                |
|o3 = ToricQuiver{flow => {1, 1, 1, 1}                  }        |
|                 IncidenceMatrix => | -1 -1 -1 -1 |             |
|                                    | 1  1  0  0  |             |
|                                    | 0  0  1  1  |             |
|                 Q0 => {0, 1, 2}                                |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}         |
|                 weights => {-4, 2, 2}                          |
|                                                                |
|o3 : ToricQuiver                                                |
+----------------------------------------------------------------+

create a toric quiver from matrix with specified flow

+-----------------------------------------------------------------------------+
|i4 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), {3, 1, 0,  |
|                                                                             |
|o4 = ToricQuiver{flow => {3, 1, 0, 5}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-9, 4, 5}                                       |
|                                                                             |
|o4 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|5})                                                                          |
+-----------------------------------------------------------------------------+

create a toric quiver from a list of edges

+--------------------------------------------------------+
|i5 : Q = toricQuiver {{0,1},{0,1},{0,2},{0,2}}          |
|                                                        |
|o5 = ToricQuiver{flow => {1, 1, 1, 1}                  }|
|                 IncidenceMatrix => | -1 -1 -1 -1 |     |
|                                    | 1  1  0  0  |     |
|                                    | 0  0  1  1  |     |
|                 Q0 => {0, 1, 2}                        |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}} |
|                 weights => {-4, 2, 2}                  |
|                                                        |
|o5 : ToricQuiver                                        |
+--------------------------------------------------------+

create a toric quiver from a list of edges and a flow

+-----------------------------------------------------------+
|i6 : Q = toricQuiver ({{0,1},{0,1},{0,2},{0,2}}, {1,2,3,4})|
|                                                           |
|o6 = ToricQuiver{flow => {1, 2, 3, 4}                  }   |
|                 IncidenceMatrix => | -1 -1 -1 -1 |        |
|                                    | 1  1  0  0  |        |
|                                    | 0  0  1  1  |        |
|                 Q0 => {0, 1, 2}                           |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}    |
|                 weights => {-10, 3, 7}                    |
|                                                           |
|o6 : ToricQuiver                                           |
+-----------------------------------------------------------+

create a toric quiver from a matrix with keyword flow

+-----------------------------------------------------------------------------+
|i7 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}),            |
|                                                                             |
|o7 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o7 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|Flow=>"Canonical")                                                           |
+-----------------------------------------------------------------------------+

create a toric quiver from a matrix with random flow

+-----------------------------------------------------------------------------+
|i8 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{0,0,1,1},{1,1,0,0}}),            |
|                                                                             |
|o8 = ToricQuiver{flow => {91, 72, 93, 79}              }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 0  0  1  1  |                          |
|                                    | 1  1  0  0  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}}                      |
|                 weights => {-335, 172, 163}                                 |
|                                                                             |
|o8 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|Flow=>"Random")                                                              |
+-----------------------------------------------------------------------------+

create a toric quiver copied from another one

+--------------------------------------------------------+
|i9 : R = toricQuiver(Q)                                 |
|                                                        |
|o9 = ToricQuiver{flow => {91, 72, 93, 79}              }|
|                 IncidenceMatrix => | -1 -1 -1 -1 |     |
|                                    | 0  0  1  1  |     |
|                                    | 1  1  0  0  |     |
|                 Q0 => {0, 1, 2}                        |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}} |
|                 weights => {-335, 172, 163}            |
|                                                        |
|o9 : ToricQuiver                                        |
+--------------------------------------------------------+

create a toric quiver copied from another, but with alternative flow

+---------------------------------------------------------+
|i10 : R = toricQuiver(Q, {1,2,3,4})                      |
|                                                         |
|o10 = ToricQuiver{flow => {1, 2, 3, 4}                  }|
|                  IncidenceMatrix => | -1 -1 -1 -1 |     |
|                                     | 0  0  1  1  |     |
|                                     | 1  1  0  0  |     |
|                  Q0 => {0, 1, 2}                        |
|                  Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}} |
|                  weights => {-10, 7, 3}                 |
|                                                         |
|o10 : ToricQuiver                                        |
+---------------------------------------------------------+

ToricQuiver -- the ToricQuiver datatype
***************************************

Description
===========

The ToricQuiver data type is a type of Hash Table with the following keys:

  * IncidenceMatrix:matrix representation of the connected graph underlying the
    quiver
  * flow:              list of integers representing the flow associated to
    each edge of the quiver
  * Q0:                the list of vertices
  * Q1:                the list of edges
  * weights:           the values on each vertex induced by the flow

See also
========

  * toricQuiver -- the toricQuiver constructor
  * bipartiteQuiver -- make a toric quiver on
    underlying bipartite graph
  * threeVertexQuiver -- make a toric quiver on
    underlying graph with three vertices and a specified number of edges
    between each
  * chainQuiver -- make a toric quiver on underlying graph
    in the form of a chain

Methods that use an object of class ToricQuiver :
=================================================

  * "basisForFlowPolytope(List,ToricQuiver)" -- see basisForFlowPolytope,
    -- compute the necessary basis vectors for the
    hyperplane of a flow polytope
  * "basisForFlowPolytope(ToricQuiver)" -- see basisForFlowPolytope,
    -- compute the necessary basis vectors for the
    hyperplane of a flow polytope
  * "flowPolytope(List,ToricQuiver)" -- see flowPolytope,
    -- generate the polytope associated to a toric quiver
  * "flowPolytope(ToricQuiver)" -- see flowPolytope, --
    generate the polytope associated to a toric quiver
  * "isAcyclic(ToricQuiver)" -- see isAcyclic, -- check that a
    quiver has no cycles
  * "isClosedUnderArrows(List,ToricQuiver)" -- see isClosedUnderArrows,
    -- is a subquiver closed under arrows?
  * "isClosedUnderArrows(Matrix,ToricQuiver)" -- see isClosedUnderArrows,
    -- is a subquiver closed under arrows?
  * "isClosedUnderArrows(ToricQuiver,ToricQuiver)" -- see
    isClosedUnderArrows, -- is a subquiver closed under
    arrows?
  * "isSemistable(List,ToricQuiver)" -- see isSemistable,
    -- determines if a subquiver is semistable with respect to a given weight
  * "isSemistable(ToricQuiver,ToricQuiver)" -- see isSemistable,
    -- determines if a subquiver is semistable with respect to a
    given weight
  * "isStable(List,ToricQuiver)" -- see isStable, -- determines
    if a subquiver is semistable with respect to a given weight
  * "isStable(ToricQuiver,ToricQuiver)" -- see isStable, --
    determines if a subquiver is semistable with respect to a given weight
  * "isTight(List,ToricQuiver)" -- see isTight, -- determine if
    toric quiver is tight
  * "isTight(ToricQuiver)" -- see isTight, -- determine if toric
    quiver is tight
  * "isTight(ToricQuiver,List)" -- see isTight, -- determine if
    toric quiver is tight
  * "maxCodimensionUnstable(ToricQuiver)" -- see maxCodimensionUnstable,
    -- compute the maximal codimension of the unstable
    loci of a quiver
  * "mergeOnArrow(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnArrow(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnArrow(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see mergeOnArrow,
    -- join two quivers together by identifying an arrow from
    each
  * "mergeOnVertex(Matrix,ZZ,ToricQuiver,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "mergeOnVertex(ToricQuiver,ZZ,Matrix,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "mergeOnVertex(ToricQuiver,ZZ,ToricQuiver,ZZ)" -- see mergeOnVertex,
    -- join two quivers together by identifying a vertex from
    each
  * "potentialWalls(ToricQuiver)" -- see potentialWalls,
    -- return the potential walls in the weight chamber decomposition for a
    given quiver
  * "subquivers(ToricQuiver)" -- see subquivers, -- return
    all possible subquivers of a given quiver
  * "theta(ToricQuiver)" -- see theta, -- image of the flow on the
    vertices
  * "toricQuiver(ToricQuiver)" -- see toricQuiver, -- the
    toricQuiver constructor
  * "toricQuiver(ToricQuiver,List)" -- see toricQuiver, --
    the toricQuiver constructor
  * ToricQuiver == ToricQuiver -- comparing
    instances of ToricQuiver
  * ToricQuiver ^ List -- taking a subquiver by
    indexing
  * ToricQuiver _ List -- taking a subquiver by
    indexing
  * "wallType(List,ToricQuiver)" -- see wallType, -- get the
    type of a wall for a given quiver

For the programmer
==================

The object ToricQuiver, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

toricQuiver -- the toricQuiver constructor
******************************************

Synopsis
========

  * Usage:
        Q = toricQuiver E
        Q = toricQuiver (E, F)
        Q = toricQuiver M
        Q = toricQuiver (M, F)
        Q = toricQuiver G
        Q = toricQuiver (G, F)
        Q = toricQuiver T
        Q = toricQuiver (T, F)
  * Inputs:
      * E, a list (Macaulay2Doc), of pairs (V1, V2) giving the
        edges of the quiver in terms of the vertices
      * F, a list (Macaulay2Doc), the flow on the quiver given as a
        list of integers
      * G, a graph (Graphs),
      * M, a matrix (Macaulay2Doc), of integers giving the
        connectivity structure of the quiver
      * T, an instance of the type ToricQuiver,
  * Optional inputs (Macaulay2Doc),:
      * Flow (missing documentation) => a string (Macaulay2Doc),
        default value "Default", that specifies the flow for the polytope.
        options are Default, which takes the flow from values in the matrix,
        Canonical, which sets the flow to 1 for each edge, and Random, which
        assigns a random integer between 0 and 100 to each edge
  * Outputs:
      * Q, an instance of the type ToricQuiver,

Description
===========

A toric quiver is a directed graph Q=(Q_0, Q_1)  where Q_0 is the set of
vertices associated to Q and Q_1 is the set of arrows. Also included in $Q$ is
a flow, which associates an integer value to each edge. The canonical flow
gives a weight of 1 to each edge.

the ToricQuiver data type is stored as a hash table with the following keys:

  * IncidenceMatrix:matrix representation of the connected graph underlying the
    quiver
  * flow:              list of integers representing the flow associated to
    each edge of the quiver
  * Q0:                the list of vertices
  * Q1:                the list of edges
  * weights:           the values on each vertex induced by the flow

+-----------------------------------------------------------------------------+
|i1 : Q = toricQuiver matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}})             |
|                                                                             |
|o1 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o1 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i2 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}), {3, 1, 0,  |
|                                                                             |
|o2 = ToricQuiver{flow => {3, 1, 0, 5}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-9, 4, 5}                                       |
|                                                                             |
|o2 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|5})                                                                          |
+-----------------------------------------------------------------------------+
|i3 : Q = toricQuiver {{0,1},{0,1},{0,2},{0,2}}                               |
|                                                                             |
|o3 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o3 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i4 : Q = toricQuiver ({{0,1},{0,1},{0,2},{0,2}}, {1,2,3,4})                  |
|                                                                             |
|o4 = ToricQuiver{flow => {1, 2, 3, 4}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-10, 3, 7}                                      |
|                                                                             |
|o4 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i5 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{1,1,0,0},{0,0,1,1}}),            |
|                                                                             |
|o5 = ToricQuiver{flow => {1, 1, 1, 1}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 1  1  0  0  |                          |
|                                    | 0  0  1  1  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 1}, {0, 1}, {0, 2}, {0, 2}}                      |
|                 weights => {-4, 2, 2}                                       |
|                                                                             |
|o5 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|Flow=>"Canonical")                                                           |
+-----------------------------------------------------------------------------+
|i6 : Q = toricQuiver(matrix({{-1,-1,-1,-1},{0,0,1,1},{1,1,0,0}}),            |
|                                                                             |
|o6 = ToricQuiver{flow => {24, 65, 71, 72}              }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 0  0  1  1  |                          |
|                                    | 1  1  0  0  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}}                      |
|                 weights => {-232, 143, 89}                                  |
|                                                                             |
|o6 : ToricQuiver                                                             |
|-----------------------------------------------------------------------------|
|Flow=>"Random")                                                              |
+-----------------------------------------------------------------------------+
|i7 : R = toricQuiver(Q)                                                      |
|                                                                             |
|o7 = ToricQuiver{flow => {24, 65, 71, 72}              }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 0  0  1  1  |                          |
|                                    | 1  1  0  0  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}}                      |
|                 weights => {-232, 143, 89}                                  |
|                                                                             |
|o7 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+
|i8 : R = toricQuiver(Q, {1,2,3,4})                                           |
|                                                                             |
|o8 = ToricQuiver{flow => {1, 2, 3, 4}                  }                     |
|                 IncidenceMatrix => | -1 -1 -1 -1 |                          |
|                                    | 0  0  1  1  |                          |
|                                    | 1  1  0  0  |                          |
|                 Q0 => {0, 1, 2}                                             |
|                 Q1 => {{0, 2}, {0, 2}, {0, 1}, {0, 1}}                      |
|                 weights => {-10, 7, 3}                                      |
|                                                                             |
|o8 : ToricQuiver                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * bipartiteQuiver -- make a toric quiver on
    underlying bipartite graph

Ways to use toricQuiver :
=========================

  * "toricQuiver(List)"
  * "toricQuiver(List,List)"
  * "toricQuiver(Matrix)"
  * "toricQuiver(Matrix,List)"
  * "toricQuiver(ToricQuiver)"
  * "toricQuiver(ToricQuiver,List)"

For the programmer
==================

The object toricQuiver, is a method function with options (Macaulay2Doc).

ToricQuiver == ToricQuiver -- comparing instances of ToricQuiver
****************************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        Q1 == Q2
  * Inputs:
      * Q1, an instance of the type ToricQuiver,
      * Q2, an instance of the type ToricQuiver,

Description
===========

This method takes two toric quivers and returns the boolean of the statement Q1
is equal to Q2.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : R = bipartiteQuiver(2, 2)                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 1, 1}                  }                |
|                 IncidenceMatrix => | -1 -1 0  0  |                     |
|                                    | 0  0  -1 -1 |                     |
|                                    | 1  0  1  0  |                     |
|                                    | 0  1  0  1  |                     |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}, {1, 3}}                 |
|                 weights => {-2, -2, 2, 2}                              |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i3 : Q == R                                                             |
|                                                                        |
|o3 = false                                                              |
+------------------------------------------------------------------------+

Ways to use this method:
========================

  * ToricQuiver == ToricQuiver -- comparing
    instances of ToricQuiver

ToricQuiver ^ List -- taking a subquiver by indexing
****************************************************

Synopsis
========

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        Q^L
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * L, a list (Macaulay2Doc), of integers specifying which
        arrows to subset

Description
===========

This method returns a the subquiver of the quiver Q that is made up of the
arrows in the list L.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q^{0,1,3}                                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 0, 1, 0, 0}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-2, -1, 2, 1, 0}                           |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

Ways to use this method:
========================

  * ToricQuiver ^ List -- taking a subquiver by
    indexing

ToricQuiver _ List -- taking a subquiver by indexing
****************************************************

Synopsis
========

  * Operator: _ (Macaulay2Doc),
  * Usage:
        Q_L
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * L, a list (Macaulay2Doc), of integers specifying which
        arrows to subset

Description
===========

This method returns a the subquiver of the quiver Q that is made up of the
arrows in the list L. Note that this method re-orders the subquiver labels to
create a standalone quiver. To retain the original quiver labels on the
subquiver, see the SeeAlso.

+------------------------------------------------------------------------+
|i1 : Q = bipartiteQuiver(2, 3)                                          |
|                                                                        |
|o1 = ToricQuiver{flow => {1, 1, 1, 1, 1, 1}                            }|
|                 IncidenceMatrix => | -1 -1 -1 0  0  0  |               |
|                                    | 0  0  0  -1 -1 -1 |               |
|                                    | 1  0  0  1  0  0  |               |
|                                    | 0  1  0  0  1  0  |               |
|                                    | 0  0  1  0  0  1  |               |
|                 Q0 => {0, 1, 2, 3, 4}                                  |
|                 Q1 => {{0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}} |
|                 weights => {-3, -3, 2, 2, 2}                           |
|                                                                        |
|o1 : ToricQuiver                                                        |
+------------------------------------------------------------------------+
|i2 : Q_{0,1,3}                                                          |
|                                                                        |
|o2 = ToricQuiver{flow => {1, 1, 1}              }                       |
|                 IncidenceMatrix => | -1 -1 0  |                        |
|                                    | 0  0  -1 |                        |
|                                    | 1  0  1  |                        |
|                                    | 0  1  0  |                        |
|                 Q0 => {0, 1, 2, 3}                                     |
|                 Q1 => {{0, 2}, {0, 3}, {1, 2}}                         |
|                 weights => {-2, -1, 2, 1}                              |
|                                                                        |
|o2 : ToricQuiver                                                        |
+------------------------------------------------------------------------+

See also
========

  * ToricQuiver ^ List -- taking a subquiver by
    indexing

Ways to use this method:
========================

  * ToricQuiver _ List -- taking a subquiver by
    indexing

wallType -- get the type of a wall for a given quiver
*****************************************************

Synopsis
========

  * Usage:
        wallType (Qplus, Q)
  * Inputs:
      * Q, an instance of the type ToricQuiver,
      * Qplus, a list (Macaulay2Doc),
  * Outputs:
      * wall type is given by (ZZ, ZZ)

Description
===========

every wall can be represented uniquely by a partition of the vertices Q0 of Q
into two sets Qplus and Qminus. We denote the wall W by the subset of vertices
Qplus used for defining it.

The type of the wall is defined as (t+,t-) where t^+ is the number of arrows
starting Qplus and ending in Qminus, and t- is the number of arrows starting
Qminus and ending in Qplus.

+---------------------------------------------+
|i1 : wallType({0,2,3}, bipartiteQuiver(2, 3))|
|                                             |
|o1 = (1, 2)                                  |
|                                             |
|o1 : Sequence                                |
+---------------------------------------------+

Ways to use wallType :
======================

  * "wallType(List,ToricQuiver)"
  * wallType(List,Matrix) (missing documentation)

For the programmer
==================

The object wallType, is a method function (Macaulay2Doc).