|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.refinementoperators.MathOperations
public class MathOperations
Math operations related to refinement operators.
| Constructor Summary | |
|---|---|
MathOperations()
|
|
| Method Summary | |
|---|---|
static boolean |
containsDoubleObjectSomeRestriction(Description d)
Returns true if the same property is used twice in an object some restriction, e.g. |
static List<List<Integer>> |
getCombos(int number)
Given number, the functions returns all
combinations of natural numbers plus the number count
(which can be thought of as the number of interconnecting
symbols between those numbers) adds up to number. |
static List<List<Integer>> |
getCombos(int length,
int maxValue)
Methods for computing combinations with the additional restriction that maxValue is the highest natural number, which can
occur. |
static SortedSet<Union> |
incCrossProduct(Set<Union> baseSet,
Set<Description> newSet)
Implements a cross product in the sense that each union description in the base set is extended by each description in the new set. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MathOperations()
| Method Detail |
|---|
public static List<List<Integer>> getCombos(int number)
number, the functions returns all
combinations of natural numbers plus the number count
(which can be thought of as the number of interconnecting
symbols between those numbers) adds up to number.
It uses an efficient algorithm to achieve this, which can
handle number=50 in less than a second and number=30 in
about 10 milliseconds on an average PC.
For illustrating the function, the return values of the first numbers
are given:
number = 1: [[1]]
number = 2: [[2]]
number = 3: [[3], [1, 1]]
number = 4: [[4], [2, 1]]
number = 5: [[5], [3, 1], [2, 2], [1, 1, 1]]
number = 6: [[6], [4, 1], [3, 2], [2, 1, 1]]
number = 7: [[7], [5, 1], [4, 2], [3, 3], [3, 1, 1], [2, 2, 1], [1, 1, 1, 1]]
number - A natural number.
public static List<List<Integer>> getCombos(int length,
int maxValue)
maxValue is the highest natural number, which can
occur.
length - Length of construct.maxValue - Maximum value which can occur in sum.
getCombos(int).getCombos(int)
public static SortedSet<Union> incCrossProduct(Set<Union> baseSet,
Set<Description> newSet)
baseSet - A set of union class descriptions.newSet - The descriptions to add to each union class descriptions.
public static boolean containsDoubleObjectSomeRestriction(Description d)
d - Description to test.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||