public abstract class AbstractRelation<R,C> extends Object implements Relation<R,C>
Relation.NoHomogenRelationException
Modifier and Type | Field and Description |
---|---|
protected SetList<C> |
colHeads |
protected boolean |
homogen |
protected SetList<R> |
rowHeads |
Modifier | Constructor and Description |
---|---|
protected |
AbstractRelation(boolean homogen) |
protected |
AbstractRelation(SetList<R> rowHeads,
SetList<C> colHeads,
boolean homogen) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(R row,
C col) |
boolean |
addAll(Relation<? extends R,? extends C> r) |
boolean |
addAllFast(Relation<?,?> r) |
boolean |
addFast(Object o1,
Object o2) |
protected void |
checkHomogen() |
MatrixRelation<R,C> |
clone() |
Set<R> |
col(Object o) |
Set<R> |
colAnd(Collection<?> cols) |
Set<R> |
colAnd(Object... cols) |
SetList<C> |
colHeads() |
int |
compareTo(Relation<R,C> r) |
abstract boolean |
contains(Object o1,
Object o2) |
boolean |
containsAll(Relation<?,?> r) |
void |
dispose() |
void |
empty() |
boolean |
equals(Object o) |
SetList<Set<R>> |
equivalenceClasses() |
void |
fill() |
Relation<R,C> |
filter(com.google.common.base.Predicate<? super R> rowPredicate,
com.google.common.base.Predicate<? super C> colPredicate,
com.google.common.base.Predicate<Pair<R,C>> relationPredicate) |
static <R> AbstractRelation<R,R> |
fromPredicate(SetList<R> heads,
BiPredicate<R,R> predicate) |
static <R,C> AbstractRelation<R,C> |
fromPredicate(SetList<R> rowHeads,
SetList<C> colHeads,
BiPredicate<R,C> predicate) |
boolean |
greater(Relation<R,C> r) |
boolean |
greaterEq(Relation<R,C> r) |
boolean |
isEmpty() |
boolean |
isFull() |
boolean |
isHomogen() |
Iterator<Pair<R,C>> |
iterator() |
MatrixRelation<R,R> |
neighborhood() |
MatrixRelation<R,R> |
order() |
boolean |
remove(Object o1,
Object o2) |
boolean |
removeAll(Relation<?,?> r) |
boolean |
retainAll(Relation<?,?> r) |
Set<C> |
row(Object o) |
Set<C> |
rowAnd(Collection<?> rows) |
Set<C> |
rowAnd(Object... rows) |
SetList<R> |
rowHeads() |
int |
size() |
boolean |
smaller(Relation<R,C> r) |
boolean |
smallerEq(Relation<R,C> r) |
Relation<R,C> |
subRelation(Collection<?> rows,
Collection<?> cols) |
boolean[][] |
toArray() |
String |
toString() |
boolean |
uncomparable(Relation<R,C> r) |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
equivalent
protected final boolean homogen
protected AbstractRelation(SetList<R> rowHeads, SetList<C> colHeads, boolean homogen)
protected AbstractRelation(boolean homogen)
public static <R,C> AbstractRelation<R,C> fromPredicate(SetList<R> rowHeads, SetList<C> colHeads, BiPredicate<R,C> predicate)
public static <R> AbstractRelation<R,R> fromPredicate(SetList<R> heads, BiPredicate<R,R> predicate)
public boolean containsAll(Relation<?,?> r)
containsAll
in interface Relation<R,C>
public Relation<R,C> subRelation(Collection<?> rows, Collection<?> cols)
subRelation
in interface Relation<R,C>
public Relation<R,C> filter(com.google.common.base.Predicate<? super R> rowPredicate, com.google.common.base.Predicate<? super C> colPredicate, com.google.common.base.Predicate<Pair<R,C>> relationPredicate)
public final boolean smallerEq(Relation<R,C> r)
smallerEq
in interface PartialComparable<Relation<R,C>>
public final boolean smaller(Relation<R,C> r)
smaller
in interface PartialComparable<Relation<R,C>>
public final boolean greaterEq(Relation<R,C> r)
greaterEq
in interface PartialComparable<Relation<R,C>>
public final boolean greater(Relation<R,C> r)
greater
in interface PartialComparable<Relation<R,C>>
public final boolean uncomparable(Relation<R,C> r)
uncomparable
in interface PartialComparable<Relation<R,C>>
public final int compareTo(Relation<R,C> r)
compareTo
in interface Comparable<Relation<R,C>>
public MatrixRelation<R,C> clone()
public boolean addAllFast(Relation<?,?> r)
addAllFast
in interface Relation<R,C>
protected final void checkHomogen() throws Relation.NoHomogenRelationException
public MatrixRelation<R,R> neighborhood()
neighborhood
in interface Relation<R,C>
public SetList<Set<R>> equivalenceClasses()
equivalenceClasses
in interface Relation<R,C>
Copyright © 2010–2023 Francesco Kriegel. All rights reserved.