samples.tutorials.set
Class SteinerSystem
java.lang.Object
samples.tutorials.PatternExample
samples.tutorials.set.SteinerSystem
- All Implemented Interfaces:
- Example
public class SteinerSystem
- extends PatternExample
Field Summary |
protected int |
n
|
protected int |
p
A ternary Steiner system of order n is a set of triplets of distinct elements
taking their values between 1 and n, such that all the pairs included in two different triplets are different. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
p
protected int p
- A ternary Steiner system of order n is a set of triplets of distinct elements
taking their values between 1 and n, such that all the pairs included in two different triplets are different.
a solution for n = 7 :
[{1, 2, 3}, {2, 4, 5}, {3, 4, 6}, {1, 4, 7}, {1, 5, 6}, {2,6, 7}, {3, 5, 7}]
we must have n % 6 = 1 or n % 6 = 3 to get a valid n for the problem
n
protected int n
SteinerSystem
public SteinerSystem()
printDescription
public void printDescription()
- Overrides:
printDescription
in class PatternExample
buildModel
public void buildModel()
- Specified by:
buildModel
in class PatternExample
buildSolver
public void buildSolver()
- Specified by:
buildSolver
in class PatternExample
solve
public void solve()
- Specified by:
solve
in class PatternExample
prettyOut
public void prettyOut()
- Specified by:
prettyOut
in class PatternExample
main
public static void main(String[] args)
Copyright © 2012. All Rights Reserved.