public final class FactoryFactory extends Object
Factory
's and SetFactory
's for the
interfaces in the API. Depending on the Options
passed to the
constructor, the String representations used by all the factories generated
will vary. It is, in general, not possible to pass a String representation
output by one group of factories, arising from a particular
FactoryFactory
to another group of factories, arising from a
different FactoryFactory
. It is however possible to pass an item
constructed from String's between groups of factories.
Various convenience methods are also provided, for some easy ways to produce an oriented matroid.
Constructor and Description |
---|
FactoryFactory()
A new
FactoryFactory with default options. |
FactoryFactory(Options opt)
A new
FactoryFactory with given Options . |
Modifier and Type | Method and Description |
---|---|
Factory<MatroidAsSet> |
bases()
A factory for matroids from bases.
|
ChirotopeFactory |
chirotope()
A factory for oriented matroids which uses the chirotope representation.
|
OMSFactory |
circuits()
A factory for oriented matroids which uses the circuit representation.
|
static OM |
fromCircuits(String circuits)
Given a string representation of a set of circuits
create an oriented matroid.
|
static OM |
fromCoLexicographic(int n,
int r,
String chi)
Gives an oriented matroid corresponding to a chirotope in
colexicographic form.
|
static OM |
fromCrossings(String... crossings)
This method is for turning a pseudoline configuration into an oriented matroid.
|
static OM |
fromEuclideanLines(int[][]... lines)
Generate an OM from lines being specified as a pair of points (integer coordinates).
|
static OM |
fromLexicographic(int n,
int r,
String chi)
Gives an oriented matroid corresponding to a chirotope in
lexicographic form.
|
static OM |
fromMatrix(double threshold,
double[][] matrix)
This method is for turning a simple matrix of doubles into
an oriented matroid over the columns.
|
static OM |
fromMatrix(int[][] matrix)
This method is for turning a simple matrix of integers into
an oriented matroid over the columns.
|
Factory<MatroidAsSet> |
independentSets()
A factory for matroids from independent sets.
|
LabelFactory |
labels()
A factory for labels.
|
OMSFactory |
maxVectors()
A factory for oriented matroids which uses the maximum vector (co-tope)
representation.
|
Options |
options()
The options used by this factory.
|
RealizedFactory |
realized()
A factory for oriented matroids which uses a realization of the OM as the
representation.
|
SetFactory<SignedSet,SetOfSignedSet> |
setsOfSignedSet()
A factory for sets of signed sets.
|
SetFactory<UnsignedSet,SetOfUnsignedSet> |
setsOfUnsignedSet()
A factory for sets of unsigned sets.
|
SignedSetFactory |
signedSets()
A factory for signed sets.
|
SetFactory<SignedSet,SetOfSignedSet> |
symmetricSetsOfSignedSet()
A factory for symmetric sets of signed sets.
|
Factory<MatroidAsSet> |
unsignedCircuits()
A factory for matroids from circuits.
|
SetFactory<Label,UnsignedSet> |
unsignedSets()
A factory for unsigned sets.
|
OMSFactory |
vectors()
A factory for oriented matroids which uses the vector representation.
|
public FactoryFactory()
FactoryFactory
with default options.public FactoryFactory(Options opt)
FactoryFactory
with given Options
. These control
the String representations used.public LabelFactory labels()
public Factory<MatroidAsSet> bases()
public Factory<MatroidAsSet> unsignedCircuits()
public Factory<MatroidAsSet> independentSets()
public OMSFactory circuits()
public ChirotopeFactory chirotope()
public OMSFactory vectors()
public OMSFactory maxVectors()
public RealizedFactory realized()
public SignedSetFactory signedSets()
public SetFactory<Label,UnsignedSet> unsignedSets()
public SetFactory<UnsignedSet,SetOfUnsignedSet> setsOfUnsignedSet()
public SetFactory<SignedSet,SetOfSignedSet> setsOfSignedSet()
public SetFactory<SignedSet,SetOfSignedSet> symmetricSetsOfSignedSet()
public Options options()
public static OM fromCoLexicographic(int n, int r, String chi)
n
- The number of elements on which the oriented matroid is defined.r
- The rankchi
- The colexicographic chirotopeChirotopeFactory.fromCoLexicographic(int, String)
public static OM fromLexicographic(int n, int r, String chi)
NB: this library uses colexicographic ordering throughout and lexicographic ordering is only available here, and at the two other listed methods.
n
- The number of elements on which the oriented matroid is defined.r
- The rankchi
- The lexicographic chirotopeChirotopeFactory.fromLexicographic(int, String)
,
fromLexicographic(int, int, String)
,
OMasChirotope.toLexicographicString()
public static OM fromCircuits(String circuits)
circuits
- A string representation of a set of circuitspublic static OM fromEuclideanLines(int[][]... lines)
This is very easy to do from a reasonably precise accurate sketch, see Examples.circularsaw3()
for a documented example.
lines
- a list of lines each specified by two points by x, y coordinates.public static OM fromCrossings(String... crossings)
crossings
- Information about the order in which the pseudolines cross each otherpublic static OM fromMatrix(int[][] matrix)
matrix
- public static OM fromMatrix(double threshold, double[][] matrix)
threshold
parameter is to deal
with rounding errors. Any determinant which is close to zero
is treated as zero, with the largest close-to-zero determinant
being at least a factor of threshold smaller than the smallest non-zero determinant.matrix
- threshold
- Should be 1000 ?