public class Cover extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
entries |
protected double |
onesWeight |
protected int |
width |
| Constructor and Description |
|---|
Cover(int width,
double onesWeight)
Constructs a cover row
|
| Modifier and Type | Method and Description |
|---|---|
Tuple<Integer,Integer> |
apply(int c)
returns tuple
(#TRUE, #UNKNOWN) |
double |
coverChangeDensityOnInclusion(BooleanMatrix coveredRow,
BooleanMatrix basisRow)
weighted cover change (indicating "direction" of the change), divided by
the weighted number of changed entries (indicating "magnitude" of the
change)
|
double |
coverChangeOnExclusion(BooleanMatrix coveredRow,
BooleanMatrix basisRow)
analogous to coverChangeOnInclusion
|
double |
coverChangeOnInclusion(BooleanMatrix coveredRow,
BooleanMatrix basisRow)
weighted sum of the results returned by coveredOnesAndZerosOnInclusion
|
Tuple<Integer,Integer> |
coveredOnesAndZerosOnInclusion(BooleanMatrix coveredRow,
BooleanMatrix basisRow)
Predicts the number of covered ones and zeros, given the row that is
being covered, and the basis row that could be included into this cover.
|
boolean |
equals(Object obj) |
void |
exclude(BooleanMatrix basisRow)
Excludes a basis row from this cover
|
int |
hashCode() |
void |
include(BooleanMatrix basisRow)
Includes a basis row into this cover
|
BooleanMatrix |
toBooleanMatrix()
transforms this cover to a boolean matrix
|
String |
toString() |
Tuple<Integer,Integer> |
uncoveredOnesAndZerosOnExclusion(BooleanMatrix coveredRow,
BooleanMatrix basisRow)
analogous to coveredOnesAndZerosOnInclusion
|
void |
update(int c,
int ones,
int unknowns)
updates entry of this cover
|
Cover |
zero(int width)
Creates a new zero cover of specified width
|
protected double onesWeight
protected int width
protected int[] entries
public Cover(int width,
double onesWeight)
width - onesWeight - public Tuple<Integer,Integer> apply(int c)
(#TRUE, #UNKNOWN)c - index of the columnpublic void update(int c,
int ones,
int unknowns)
c - index of a columnones - #TRUEunknowns - #UNKNOWNpublic void include(BooleanMatrix basisRow)
basisRow - public void exclude(BooleanMatrix basisRow)
basisRow - public Tuple<Integer,Integer> coveredOnesAndZerosOnInclusion(BooleanMatrix coveredRow, BooleanMatrix basisRow)
coveredRow - boolean matrix row, this cover is associated withbasisRow - boolean matrix row, that potentially could be included into
this cover(#1, #0) covered in case of inclusionpublic Tuple<Integer,Integer> uncoveredOnesAndZerosOnExclusion(BooleanMatrix coveredRow, BooleanMatrix basisRow)
coveredRow - basisRow - public double coverChangeOnInclusion(BooleanMatrix coveredRow, BooleanMatrix basisRow)
coveredRow - basisRow - onesWeight * #1 + #0public double coverChangeOnExclusion(BooleanMatrix coveredRow, BooleanMatrix basisRow)
coveredRow - basisRow - public double coverChangeDensityOnInclusion(BooleanMatrix coveredRow, BooleanMatrix basisRow)
coveredRow - basisRow - public BooleanMatrix toBooleanMatrix()
public Cover zero(int width)
width - Copyright © 2015. All rights reserved.