org.latdraw.partition
Interface Partition

All Known Implementing Classes:
BasicPartition

public interface Partition

This interface specifies the basic operations for partitions on the set {0, 1, ..., n-1}. This also specifies that the partition should have a system of distinct representatives, an SDR.

Version:
$Id: Partition.java,v 1.1 2008/08/01 19:30:57 ralph Exp $
Author:
Ralph Freese

Field Summary
static int BLOCK
          Printing types: blocks, the useual way of writing a partition.
static int EWK
          Printing types: the algebra program representtation: a comma separated sequence of ints defining a map whose kernel is the partition.
static int HUMAN
          Printing types: blocks, plus number of blocks at the end.
static int INTERNAL
          Printing types: the internal representation.
static int ONE_INDEXED
          Same as BLOCK but the set is 1 to n.
 
Method Summary
 int[][] getBlocks()
           
 boolean isRelated(int i, int j)
           
 boolean isRepresentative(int i)
           
 boolean isZero()
           
 Partition join(Partition part2)
          * Note r and s must be roots and distinct.
 boolean leq(Partition part2)
           
 Partition meet(Partition part2)
           
 void normalize()
           
 int numberOfBlocks()
           
 int representative(int i)
           
 int[] representatives()
           
 int size()
           
 int[] toArray()
          This returns the array representation of the partition as described in Ralph Freese's notes on partitions, see * http://www.math.hawaii.edu/~ralph/Notes/.
 java.lang.String toString(int kind)
           
 

Field Detail

INTERNAL

static final int INTERNAL
Printing types: the internal representation.

See Also:
Constant Field Values

EWK

static final int EWK
Printing types: the algebra program representtation: a comma separated sequence of ints defining a map whose kernel is the partition.

See Also:
Constant Field Values

BLOCK

static final int BLOCK
Printing types: blocks, the useual way of writing a partition.

See Also:
Constant Field Values

HUMAN

static final int HUMAN
Printing types: blocks, plus number of blocks at the end.

See Also:
Constant Field Values

ONE_INDEXED

static final int ONE_INDEXED
Same as BLOCK but the set is 1 to n.

See Also:
Constant Field Values
Method Detail

toArray

int[] toArray()
This returns the array representation of the partition as described in Ralph Freese's notes on partitions, see * http://www.math.hawaii.edu/~ralph/Notes/.


join

Partition join(Partition part2)
* Note r and s must be roots and distinct.


meet

Partition meet(Partition part2)

leq

boolean leq(Partition part2)

normalize

void normalize()

size

int size()

numberOfBlocks

int numberOfBlocks()

isRelated

boolean isRelated(int i,
                  int j)

toString

java.lang.String toString(int kind)

representative

int representative(int i)

isRepresentative

boolean isRepresentative(int i)

representatives

int[] representatives()

getBlocks

int[][] getBlocks()

isZero

boolean isZero()


Copyright 2003 Ralph Freese. All Rights Reserved.