Skip to content

Commit

Permalink
Bug after new checkout fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
DDred committed Sep 10, 2011
1 parent 4a9dd09 commit b0cf4d2
Show file tree
Hide file tree
Showing 39 changed files with 366 additions and 75 deletions.
16 changes: 16 additions & 0 deletions .idea/libraries/BioJava.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/libraries/JasperReports.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/MySQL.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/libraries/POI.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Jlibiada.iml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<orderEntry type="library" name="Rapidminer" level="project" />
<orderEntry type="library" name="BioJava" level="project" />
<orderEntry type="library" name="Bio" level="project" />
<orderEntry type="library" name="BioJava" level="project" />
<orderEntry type="library" name="JasperReports" level="project" />
<orderEntry type="library" name="MySQL" level="project" />
<orderEntry type="library" name="POI" level="project" />
</component>
</module>

Binary file added lib/poi-3.8-beta4/lib/commons-logging-1.1.jar
Binary file not shown.
Binary file added lib/poi-3.8-beta4/lib/junit-3.8.1.jar
Binary file not shown.
Binary file added lib/poi-3.8-beta4/lib/log4j-1.2.13.jar
Binary file not shown.
Binary file added lib/poi-3.8-beta4/ooxml-lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file added lib/poi-3.8-beta4/ooxml-lib/stax-api-1.0.1.jar
Binary file not shown.
Binary file added lib/poi-3.8-beta4/ooxml-lib/xmlbeans-2.3.0.jar
Binary file not shown.
Binary file added lib/poi-3.8-beta4/poi-3.8-beta4-20110826.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import libiada.FastChainAlgorithms.FastChain.FastChain;
import libiada.FastChainAlgorithms.FastChain.FastUniformChain;
import libiada.FastChainAlgorithms.FastChain.Interfaces.IFastCalculator;
import libiada.FastChainAlgorithms.FastChain.Interfaces.FastCalculatorBase;
import libiada.IntervalAnalysis.LinkUp;

/**
Expand All @@ -11,7 +11,7 @@
* Date: 29.07.11
* Time: 19:01
*/
public class FastAverageGeometryInterval implements IFastCalculator {
public class FastAverageGeometryInterval extends FastCalculatorBase {
@Override
public double getValue(FastChain chain, LinkUp linkUp) throws Exception {
double V = FastCalculatorFactory.getVolume().getValue(chain, linkUp);
Expand All @@ -21,13 +21,24 @@ public double getValue(FastChain chain, LinkUp linkUp) throws Exception {

@Override
public double getValue(FastUniformChain chain, LinkUp linkUp) throws Exception {
super.getValue(chain, linkUp);
double V = FastCalculatorFactory.getVolume().getValue(chain, linkUp);
double n = FastCalculatorFactory.getEventCount().getValue(chain, linkUp);
return Math.pow(V, 1 / n);
}

@Override
public String getName() {
return "gelta_g";
return "gelta_g" + super.getName();
}

@Override
public String getType() {
return "double";
}

@Override
public String getGroup() {
return "Building characteristic";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import libiada.FastChainAlgorithms.FastChain.FastChain;
import libiada.FastChainAlgorithms.FastChain.FastUniformChain;
import libiada.FastChainAlgorithms.FastChain.Interfaces.IFastCalculator;
import libiada.FastChainAlgorithms.FastChain.Interfaces.FastCalculatorBase;
import libiada.IntervalAnalysis.LinkUp;

/**
Expand All @@ -11,7 +11,7 @@
* Date: 29.07.11
* Time: 19:33
*/
public class FastAverageRemoteness implements IFastCalculator {
public class FastAverageRemoteness extends FastCalculatorBase {
@Override
public double getValue(FastChain chain, LinkUp linkUp) throws Exception {
double n = FastCalculatorFactory.getEventCount().getValue(chain, linkUp);
Expand All @@ -21,13 +21,24 @@ public double getValue(FastChain chain, LinkUp linkUp) throws Exception {

@Override
public double getValue(FastUniformChain chain, LinkUp linkUp) throws Exception {
super.getValue(chain, linkUp);
double n = FastCalculatorFactory.getEventCount().getValue(chain, linkUp);
double gamaut = FastCalculatorFactory.getGamaut().getValue(chain, linkUp);
return gamaut / n;
}

@Override
public String getName() {
return "g";
return "g" + super.getName();
}

@Override
public String getType() {
return "double";
}

@Override
public String getGroup() {
return "Building characteristic";
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package libiada.FastChainAlgorithms.FastChain.Calculators;

import libiada.FastChainAlgorithms.FastChain.Interfaces.IFastCalculator;
import libiada.FastChainAlgorithms.FastChain.Interfaces.FastCalculatorBase;

import java.util.HashSet;

Expand All @@ -11,47 +11,67 @@
* Time: 0:46
*/
public class FastCalculatorFactory {
public static IFastCalculator getVolume() {
public static FastCalculatorBase getVolume() {
return new FastVolume();
}

public static IFastCalculator getHentropy() {
public static FastCalculatorBase getHentropy() {
return new FastHentropy();
}

public static IFastCalculator getPropability() {
public static FastCalculatorBase getPropability() {
return new FastPropability();
}

public static IFastCalculator getEventCount() {
public static FastCalculatorBase getEventCount() {
return new FastIntervalsCount();
}

public static IFastCalculator getGamaut() {
public static FastCalculatorBase getGamaut() {
return new FastGamaut();
}

public static IFastCalculator getAverageRemoteness() {
public static FastCalculatorBase getAverageRemoteness() {
return new FastAverageRemoteness();
}

public static IFastCalculator getRegularity() {
public static FastCalculatorBase getRegularity() {
return new FastRegularity();
}

public static IFastCalculator getLength() {
public static FastCalculatorBase getLength() {
return new FastLength();
}

public static IFastCalculator getPositionedPropability(String event, HashSet<Integer> poses, int period) {
public static FastCalculatorBase getPositionedPropability(String event, HashSet<Integer> poses, int period) {
return new FastPositionedPropability(event, poses, period);
}

public static IFastCalculator getFastShepherd() {
public static FastCalculatorBase getFastShepherd() {
return new FastShepherd();
}

public static IFastCalculator getPositionedEventCount(String event, HashSet<Integer> poses, int period) {
public static FastCalculatorBase getPositionedEventCount(String event, HashSet<Integer> poses, int period) {
return new FastPositionedEventCount(event, poses, period);
}

public static FastCalculatorBase getFastTramontanoMacchiato() {
return new FastTramontanoMacchiato();
}

public static FastCalculatorBase getGeometryInterval() {
return new FastAverageGeometryInterval();
}

public static FastCalculatorBase getBinaryAverageGeomertyInterval(String sym1, String sym2) {
return new BinaryFastAverageGeometryInterval(sym1, sym2);
}

public static FastCalculatorBase getBinaryAverageRemoteness(String sym1, String sym2) {
return new BinaryFastAverageRemoteness(sym1, sym2);
}

public static FastCalculatorBase getPositionedAverageRemoteness(String event, HashSet<Integer> poses, int period) {
return new FastPositionedAverageRemoteness(event, poses, period);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import libiada.FastChainAlgorithms.FastChain.FastChain;
import libiada.FastChainAlgorithms.FastChain.FastUniformChain;
import libiada.FastChainAlgorithms.FastChain.Interfaces.IFastCalculator;
import libiada.FastChainAlgorithms.FastChain.Interfaces.FastCalculatorBase;
import libiada.IntervalAnalysis.LinkUp;

import java.util.Map;
Expand All @@ -13,7 +13,7 @@
* Date: 29.07.11
* Time: 19:51
*/
public class FastGamaut implements IFastCalculator {
public class FastGamaut extends FastCalculatorBase {
@Override
public double getValue(FastChain chain, LinkUp linkUp) throws Exception {
double value = 0;
Expand All @@ -25,6 +25,7 @@ public double getValue(FastChain chain, LinkUp linkUp) throws Exception {

@Override
public double getValue(FastUniformChain chain, LinkUp linkUp) throws Exception {
super.getValue(chain, linkUp);
double result = 0;
for (Map.Entry<Integer, Integer> entry : chain.getCommonIntervals().entrySet()) {
result += entry.getValue() * Math.log10(entry.getKey()) / Math.log10(2);
Expand Down Expand Up @@ -59,6 +60,16 @@ public double getValue(FastUniformChain chain, LinkUp linkUp) throws Exception {

@Override
public String getName() {
return "G";
return "G" + super.getName();
}

@Override
public String getType() {
return "double";
}

@Override
public String getGroup() {
return "Building characteristic";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import libiada.FastChainAlgorithms.FastChain.FastChain;
import libiada.FastChainAlgorithms.FastChain.FastUniformChain;
import libiada.FastChainAlgorithms.FastChain.Interfaces.IFastCalculator;
import libiada.FastChainAlgorithms.FastChain.Interfaces.FastCalculatorBase;
import libiada.IntervalAnalysis.LinkUp;

/**
Expand All @@ -11,24 +11,36 @@
* Date: 29.07.11
* Time: 2:46
*/
public class FastHentropy implements IFastCalculator {
public class FastHentropy extends FastCalculatorBase {
@Override
public double getValue(FastChain chain, LinkUp linkUp) throws Exception {
double result = 0;
for (int i = 0; i < chain.alphabetPower(); i++) {
result -= getValue(chain.getFastUniformChain(i), linkUp);
result += getValue(chain.getFastUniformChain(i), linkUp);
}
event = null;
return result;
}

@Override
public double getValue(FastUniformChain chain, LinkUp linkUp) throws Exception {
super.getValue(chain, linkUp);
double p = FastCalculatorFactory.getPropability().getValue(chain, linkUp);
return p * (Math.log10(p) / Math.log10(2));
return -p * (Math.log10(p) / Math.log10(2));
}

@Override
public String getName() {
return "H";
return "H" + super.getName();
}

@Override
public String getType() {
return "double";
}

@Override
public String getGroup() {
return "Propability";
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package libiada.FastChainAlgorithms.FastChain.Calculators;

import libiada.FastChainAlgorithms.FastChain.FastChain;
import libiada.FastChainAlgorithms.FastChain.FastIntervalsChain;
import libiada.FastChainAlgorithms.FastChain.FastUniformChain;
import libiada.FastChainAlgorithms.FastChain.Interfaces.IFastCalculator;
import libiada.FastChainAlgorithms.FastChain.UtilClasses.FastIntervalsChain;
import libiada.FastChainAlgorithms.FastChain.Interfaces.FastCalculatorBase;
import libiada.IntervalAnalysis.LinkUp;

/**
Expand All @@ -12,20 +12,32 @@
* Date: 29.07.11
* Time: 19:06
*/
public class FastIntervalsCount implements IFastCalculator {
public class FastIntervalsCount extends FastCalculatorBase {
@Override
public double getValue(FastChain chain, LinkUp linkUp) throws Exception {
return getCommonValue(chain, linkUp);
}

@Override
public double getValue(FastUniformChain chain, LinkUp linkUp) throws Exception {
super.getValue(chain, linkUp);
event = chain.getEvent();
return getCommonValue(chain, linkUp);
}

@Override
public String getName() {
return "n";
return "Intervals count" + super.getName();
}

@Override
public String getType() {
return "int";
}

@Override
public String getGroup() {
return "Building characteristic";
}

private double getCommonValue(FastIntervalsChain chain, LinkUp linkUp) throws Exception {
Expand Down
Loading

0 comments on commit b0cf4d2

Please sign in to comment.