Skip to content

Commit

Permalink
#1 Partition is completely traslated
Browse files Browse the repository at this point in the history
  • Loading branch information
tajtiakos committed Apr 10, 2011
1 parent f8f31e2 commit 3b91411
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/ex/tajti/mining/Partition.java
Expand Up @@ -228,11 +228,10 @@ public int getLevel() {
//private static List<EquivalenceClass<Object, Integer>> result; //private static List<EquivalenceClass<Object, Integer>> result;


/** /**
* Visszaadja azoknak az ekvivalencia osztályoknak a listáját, amit az <code>extended</code> * Returns the list of equivalence classes that must be deleted from <code>extended</code>
* partícióból törölni kell ahhoz, hogy az <code>attribute -> extended.attribute</code> * in order to make the <code>attribute -> extended.attribute</code> functional dependency
* függőség teljesüljön. Itt <code>attribute</code> része <code>extended.attribute</code>-nak. * valid. <code>attribute</code> must be a subset of <code>extended.attribute</code>. If this
* Ha ez nem teljesül, vagy <code>extended == null</code>, akkor a metódus * is not the case or <code>extended</code> is <code>null</code> the method returns <code>null</code>.
* <code>null</code>-t ad vissza.
* *
* @param extended * @param extended
* @return * @return
Expand All @@ -254,7 +253,7 @@ public Collection<Integer> getRowsToDelete(Partition extended) { //TODO: test th
} }


for (EquivalenceClass<Object, Integer> cl : classes) { for (EquivalenceClass<Object, Integer> cl : classes) {
int max = 0; //a maximális méretű részhalmaz int max = 0; // the size of the biggest subset
Integer maxRow = null; Integer maxRow = null;
List<Integer> clRows = cl.getRows(); List<Integer> clRows = cl.getRows();
for (Integer row : clRows) { // TODO: is SortedSet better? for (Integer row : clRows) { // TODO: is SortedSet better?
Expand All @@ -267,7 +266,7 @@ public Collection<Integer> getRowsToDelete(Partition extended) { //TODO: test th
} }


EquivalenceClass<Object, Integer> maxSuperclass = null; EquivalenceClass<Object, Integer> maxSuperclass = null;
if (max == 0) { // the case when aéé Ecs were stripped. one must be put back. if (max == 0) { // the case when all ECs were stripped. one must be put back.
EquivalenceClass<Object, Integer> newClass = new EquivalenceClass<Object, Integer>(); EquivalenceClass<Object, Integer> newClass = new EquivalenceClass<Object, Integer>();
newClass.addRow(clRows.get(0)); newClass.addRow(clRows.get(0));
extended.classes.add(newClass); extended.classes.add(newClass);
Expand Down Expand Up @@ -309,10 +308,10 @@ public Collection<Integer> getRowsToDelete(Partition extended) { //TODO: test th
} }


/** /**
* Megszámolja, hány sor van összesen ekvivalencia osztályok egy listájában. * Sums the number of rows of the ECs in <code>clazzes</code> and returns the result.
* *
* @param clazzes Ekvivalencia osztályokat tartalmazó lista. * @param clazzes
* @return Az ekvivalencia osztáylok sorainak száma összesítve. * @return
*/ */
public static Integer rowCount(List<EquivalenceClass<Object, Integer>> clazzes) { public static Integer rowCount(List<EquivalenceClass<Object, Integer>> clazzes) {
Integer count = 0; Integer count = 0;
Expand All @@ -324,9 +323,8 @@ public static Integer rowCount(List<EquivalenceClass<Object, Integer>> clazzes)
} }


/** /**
* Elkészíti a partíció únióját <code>partition</code> partícióval. A két partíció * Creates the union of this partition ant <code>other</code>. The two partition must be based on
* ugyanazon az attribútumon van értelmezve, de más sorok alapján készült. * the same attribute set. The method modifies both objects.
* Az aktuális partíció (amire a metódust meghívtuk) is módosul.
* *
* @param other * @param other
* @return * @return
Expand Down Expand Up @@ -364,7 +362,7 @@ public String toString() {
} }


/** /**
* Visszaadja a partíció ekvivalencia osztályainak listáját. * Returns the ECs of the partition.
* *
* @return the classes * @return the classes
*/ */
Expand All @@ -373,14 +371,14 @@ public List<EquivalenceClass<Object, Integer>> getClasses() {
} }


/** /**
* Kiüríti az ekvivalencia osztályok listáját. * Removes all ECs from the partition.
*/ */
public void clear() { public void clear() {
classes.clear(); classes.clear();
} }


/** /**
* Visszaadja a <code>strip()</code> metódus által eltávolított sorok számát. * Returns the number of rows removed by <code>strip()</code>.
* *
* @return the strippedRows * @return the strippedRows
*/ */
Expand All @@ -389,7 +387,7 @@ public int getStrippedRows() {
} }


/** /**
* Visszaadja a <code>strip()</code> metódus által eltávolított sorok listáját. * Returns the list of rows removed by <code>strip()</code>.
* *
* @return the rowsStripped * @return the rowsStripped
*/ */
Expand Down

0 comments on commit 3b91411

Please sign in to comment.