public class SetFactory extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
HARD_CODED |
Constructor and Description |
---|
SetFactory() |
Modifier and Type | Method and Description |
---|---|
static ISet |
makeBipartiteSet(int offSet)
Creates a set of integers, based on an offseted bipartite set,
Supports integers greater or equal than
offSet
Optimal complexity |
static ISet |
makeBitSet(int offSet)
Creates a set of integers, based on an offseted BitSet,
Supports integers greater or equal than
offSet |
static ISet |
makeConstantSet(int[] cst)
Creates a fixed set of integers, equal to
cst |
static ISet |
makeConstantSet(int lb,
int ub)
Creates a constant set of integers represented with an interval [lb, ub]
|
static ISet |
makeLinkedList()
Creates a set based on a linked list
appropriate when the set has only a few elements
|
static ISet |
makeRangeSet()
Creates a set based on an ordered list of ranges
|
static ISet |
makeSet(SetType type,
int offSet)
Creates an empty set of integers greater or equal than
offSet |
static ISet |
makeSmallBipartiteSet()
Creates a set of integers, based on an offseted bipartite set, for small sets
(arraylist inside to consume less memory)
|
static ISet |
makeStoredSet(SetType type,
int offSet,
Model model)
Creates a stored set of integers greater or equal than
offSet
Such a set is restored after a backtrack |
public static ISet makeStoredSet(SetType type, int offSet, Model model)
offSet
Such a set is restored after a backtracktype
- of set data structureoffSet
- smallest value allowed in the set (possibly < 0)model
- model providing the backtracking environmentpublic static ISet makeSet(SetType type, int offSet)
offSet
type
- implementation typeoffSet
- smallest value allowed in the set (possibly < 0)public static ISet makeRangeSet()
public static ISet makeLinkedList()
public static ISet makeBitSet(int offSet)
offSet
offSet
- smallest value allowed in the set (possibly < 0)public static ISet makeBipartiteSet(int offSet)
offSet
Optimal complexityoffSet
- smallest value allowed in the set (possibly < 0)public static ISet makeSmallBipartiteSet()
public static ISet makeConstantSet(int[] cst)
cst
cst
- set valuepublic static ISet makeConstantSet(int lb, int ub)
Copyright © 2018. All rights reserved.