mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-26 08:35:20 +00:00
Compare commits
1 Commits
time-limit
...
from-int-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d5efa1fe6 |
@@ -30,10 +30,6 @@ public class Configuration {
|
|||||||
*/
|
*/
|
||||||
private static final TomlWriter TOML_WRITER = new TomlWriter();
|
private static final TomlWriter TOML_WRITER = new TomlWriter();
|
||||||
|
|
||||||
/**
|
|
||||||
* The computation delay for which the thread can run without interruption.
|
|
||||||
*/
|
|
||||||
private double computationDelay = 0;
|
|
||||||
/**
|
/**
|
||||||
* The implementation of the number that should be used.
|
* The implementation of the number that should be used.
|
||||||
*/
|
*/
|
||||||
@@ -55,12 +51,10 @@ public class Configuration {
|
|||||||
/**
|
/**
|
||||||
* Creates a new configuration with the given values.
|
* Creates a new configuration with the given values.
|
||||||
*
|
*
|
||||||
* @param computationDelay the delay before the computation gets killed.
|
|
||||||
* @param numberImplementation the number implementation, like "naive" or "precise"
|
* @param numberImplementation the number implementation, like "naive" or "precise"
|
||||||
* @param disabledPlugins the list of disabled plugins.
|
* @param disabledPlugins the list of disabled plugins.
|
||||||
*/
|
*/
|
||||||
public Configuration(double computationDelay, String numberImplementation, String[] disabledPlugins) {
|
public Configuration(String numberImplementation, String[] disabledPlugins) {
|
||||||
this.computationDelay = computationDelay;
|
|
||||||
this.numberImplementation = numberImplementation;
|
this.numberImplementation = numberImplementation;
|
||||||
this.disabledPlugins.addAll(Arrays.asList(disabledPlugins));
|
this.disabledPlugins.addAll(Arrays.asList(disabledPlugins));
|
||||||
}
|
}
|
||||||
@@ -81,7 +75,6 @@ public class Configuration {
|
|||||||
* @param otherConfiguration the configuration to copy from.
|
* @param otherConfiguration the configuration to copy from.
|
||||||
*/
|
*/
|
||||||
public void copyFrom(Configuration otherConfiguration) {
|
public void copyFrom(Configuration otherConfiguration) {
|
||||||
this.computationDelay = otherConfiguration.computationDelay;
|
|
||||||
this.numberImplementation = otherConfiguration.numberImplementation;
|
this.numberImplementation = otherConfiguration.numberImplementation;
|
||||||
this.disabledPlugins.addAll(otherConfiguration.disabledPlugins);
|
this.disabledPlugins.addAll(otherConfiguration.disabledPlugins);
|
||||||
}
|
}
|
||||||
@@ -137,23 +130,4 @@ public class Configuration {
|
|||||||
return disabledPlugins;
|
return disabledPlugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the computation delay specified in the configuration.
|
|
||||||
*
|
|
||||||
* @return the computaton delay.
|
|
||||||
*/
|
|
||||||
public double getComputationDelay() {
|
|
||||||
return computationDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the computation delay.
|
|
||||||
*
|
|
||||||
* @param computationDelay the new computation delay.
|
|
||||||
*/
|
|
||||||
public void setComputationDelay(double computationDelay) {
|
|
||||||
this.computationDelay = computationDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,25 +12,13 @@ import javafx.stage.Stage;
|
|||||||
*/
|
*/
|
||||||
public class AbacusApplication extends Application {
|
public class AbacusApplication extends Application {
|
||||||
|
|
||||||
/**
|
|
||||||
* The controller currently managing the application.
|
|
||||||
*/
|
|
||||||
private AbacusController controller;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/abacus.fxml"));
|
Parent parent = FXMLLoader.load(getClass().getResource("/abacus.fxml"));
|
||||||
Parent parent = loader.load();
|
|
||||||
controller = loader.getController();
|
|
||||||
Scene mainScene = new Scene(parent, 320, 480);
|
Scene mainScene = new Scene(parent, 320, 480);
|
||||||
primaryStage.setScene(mainScene);
|
primaryStage.setScene(mainScene);
|
||||||
primaryStage.setTitle("Abacus");
|
primaryStage.setTitle("Abacus");
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void stop() throws Exception {
|
|
||||||
super.stop();
|
|
||||||
controller.performStop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package org.nwapw.abacus.fx;
|
package org.nwapw.abacus.fx;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.value.ChangeListener;
|
|
||||||
import javafx.beans.value.ObservableValue;
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
@@ -91,8 +89,6 @@ public class AbacusController implements PluginListener {
|
|||||||
private ComboBox<String> numberImplementationBox;
|
private ComboBox<String> numberImplementationBox;
|
||||||
@FXML
|
@FXML
|
||||||
private ListView<ToggleablePlugin> enabledPluginView;
|
private ListView<ToggleablePlugin> enabledPluginView;
|
||||||
@FXML
|
|
||||||
private TextField computationLimitField;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of history entries, created by the users.
|
* The list of history entries, created by the users.
|
||||||
@@ -128,17 +124,6 @@ public class AbacusController implements PluginListener {
|
|||||||
* The alert shown when a press to "apply" is needed.
|
* The alert shown when a press to "apply" is needed.
|
||||||
*/
|
*/
|
||||||
private Alert reloadAlert;
|
private Alert reloadAlert;
|
||||||
/**
|
|
||||||
* The runnable that takes care of killing computations that take too long.
|
|
||||||
*/
|
|
||||||
private final Runnable TIMER_RUNNABLE = () -> {
|
|
||||||
try {
|
|
||||||
Configuration abacusConfig = abacus.getConfiguration();
|
|
||||||
if(abacusConfig.getComputationDelay() == 0) return;
|
|
||||||
Thread.sleep((long) (abacusConfig.getComputationDelay() * 1000));
|
|
||||||
performStop();
|
|
||||||
} catch (InterruptedException e) { }
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* The runnable used to perform the calculation.
|
* The runnable used to perform the calculation.
|
||||||
*/
|
*/
|
||||||
@@ -176,10 +161,6 @@ public class AbacusController implements PluginListener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* The thread that is waiting to pause the calculation.
|
|
||||||
*/
|
|
||||||
private Thread computationLimitThread;
|
|
||||||
/**
|
/**
|
||||||
* The thread in which the computation runs.
|
* The thread in which the computation runs.
|
||||||
*/
|
*/
|
||||||
@@ -243,15 +224,6 @@ public class AbacusController implements PluginListener {
|
|||||||
}
|
}
|
||||||
abacusPluginManager.reload();
|
abacusPluginManager.reload();
|
||||||
|
|
||||||
computationLimitField.setText(Double.toString(abacus.getConfiguration().getComputationDelay()));
|
|
||||||
computationLimitField.textProperty().addListener((observable, oldValue, newValue) -> {
|
|
||||||
if(!newValue.matches("(\\d+(\\.\\d*)?)?")) {
|
|
||||||
computationLimitField.setText(oldValue);
|
|
||||||
} else {
|
|
||||||
changesMade = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
changesMade = false;
|
changesMade = false;
|
||||||
reloadAlertShown = false;
|
reloadAlertShown = false;
|
||||||
|
|
||||||
@@ -262,29 +234,21 @@ public class AbacusController implements PluginListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void performCalculation() {
|
private void performCalculation() {
|
||||||
inputButton.setDisable(true);
|
inputButton.setDisable(true);
|
||||||
stopButton.setDisable(false);
|
stopButton.setDisable(false);
|
||||||
calculationThread = new Thread(CALCULATION_RUNNABLE);
|
calculationThread = new Thread(CALCULATION_RUNNABLE);
|
||||||
calculationThread.start();
|
calculationThread.start();
|
||||||
computationLimitThread = new Thread(TIMER_RUNNABLE);
|
|
||||||
computationLimitThread.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void performStop(){
|
private void performStop(){
|
||||||
if(calculationThread != null) {
|
if(calculationThread != null)
|
||||||
calculationThread.interrupt();
|
calculationThread.interrupt();
|
||||||
calculationThread = null;
|
|
||||||
}
|
|
||||||
if(computationLimitThread != null){
|
|
||||||
computationLimitThread.interrupt();
|
|
||||||
computationLimitThread = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void performSaveAndReload() {
|
private void performSaveAndReload() {
|
||||||
performSave();
|
performSave();
|
||||||
performReload();
|
performReload();
|
||||||
changesMade = false;
|
changesMade = false;
|
||||||
@@ -292,13 +256,13 @@ public class AbacusController implements PluginListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void performReload() {
|
private void performReload() {
|
||||||
alertIfApplyNeeded(true);
|
alertIfApplyNeeded(true);
|
||||||
abacus.getPluginManager().reload();
|
abacus.getPluginManager().reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void performSave() {
|
private void performSave() {
|
||||||
Configuration configuration = abacus.getConfiguration();
|
Configuration configuration = abacus.getConfiguration();
|
||||||
configuration.setNumberImplementation(numberImplementationBox.getSelectionModel().getSelectedItem());
|
configuration.setNumberImplementation(numberImplementationBox.getSelectionModel().getSelectedItem());
|
||||||
Set<String> disabledPlugins = configuration.getDisabledPlugins();
|
Set<String> disabledPlugins = configuration.getDisabledPlugins();
|
||||||
@@ -306,8 +270,6 @@ public class AbacusController implements PluginListener {
|
|||||||
for (ToggleablePlugin pluginEntry : enabledPlugins) {
|
for (ToggleablePlugin pluginEntry : enabledPlugins) {
|
||||||
if (!pluginEntry.isEnabled()) disabledPlugins.add(pluginEntry.getClassName());
|
if (!pluginEntry.isEnabled()) disabledPlugins.add(pluginEntry.getClassName());
|
||||||
}
|
}
|
||||||
if(computationLimitField.getText().matches("\\d*(\\.\\d+)?") && computationLimitField.getText().length() != 0)
|
|
||||||
configuration.setComputationDelay(Double.parseDouble(computationLimitField.getText()));
|
|
||||||
configuration.saveTo(CONFIG_FILE);
|
configuration.saveTo(CONFIG_FILE);
|
||||||
changesMade = false;
|
changesMade = false;
|
||||||
reloadAlertShown = false;
|
reloadAlertShown = false;
|
||||||
@@ -334,5 +296,4 @@ public class AbacusController implements PluginListener {
|
|||||||
enabledPlugins.clear();
|
enabledPlugins.clear();
|
||||||
numberImplementationOptions.clear();
|
numberImplementationOptions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ import java.util.function.BiFunction;
|
|||||||
*/
|
*/
|
||||||
public class StandardPlugin extends Plugin {
|
public class StandardPlugin extends Plugin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores objects of NumberInterface with integer values for reuse.
|
||||||
|
*/
|
||||||
|
private final static HashMap<Class<? extends NumberInterface>, HashMap<Integer, NumberInterface>> integerValues = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The addition operator, +
|
* The addition operator, +
|
||||||
*/
|
*/
|
||||||
@@ -112,7 +117,7 @@ public class StandardPlugin extends Plugin {
|
|||||||
@Override
|
@Override
|
||||||
protected NumberInterface applyInternal(NumberInterface[] params) {
|
protected NumberInterface applyInternal(NumberInterface[] params) {
|
||||||
if (params[0].signum() == 0) {
|
if (params[0].signum() == 0) {
|
||||||
return (new NaiveNumber(1)).promoteTo(params[0].getClass());
|
return fromInt(params[0].getClass(), 1);
|
||||||
}
|
}
|
||||||
NumberInterface factorial = params[0];
|
NumberInterface factorial = params[0];
|
||||||
NumberInterface multiplier = params[0];
|
NumberInterface multiplier = params[0];
|
||||||
@@ -157,14 +162,14 @@ public class StandardPlugin extends Plugin {
|
|||||||
int powersOf2 = 0;
|
int powersOf2 = 0;
|
||||||
while (FUNCTION_ABS.apply(param.subtract(NaiveNumber.ONE.promoteTo(param.getClass()))).compareTo(new NaiveNumber(0.1).promoteTo(param.getClass())) >= 0) {
|
while (FUNCTION_ABS.apply(param.subtract(NaiveNumber.ONE.promoteTo(param.getClass()))).compareTo(new NaiveNumber(0.1).promoteTo(param.getClass())) >= 0) {
|
||||||
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() == 1) {
|
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() == 1) {
|
||||||
param = param.divide(new NaiveNumber(2).promoteTo(param.getClass()));
|
param = param.divide(fromInt(param.getClass(), 2));
|
||||||
powersOf2++;
|
powersOf2++;
|
||||||
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() != 1) {
|
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() != 1) {
|
||||||
break;
|
break;
|
||||||
//No infinite loop for you.
|
//No infinite loop for you.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
param = param.multiply(new NaiveNumber(2).promoteTo(param.getClass()));
|
param = param.multiply(fromInt(param.getClass(), 2));
|
||||||
powersOf2--;
|
powersOf2--;
|
||||||
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() != -1) {
|
if (param.subtract(NaiveNumber.ONE.promoteTo(param.getClass())).signum() != -1) {
|
||||||
break;
|
break;
|
||||||
@@ -203,17 +208,17 @@ public class StandardPlugin extends Plugin {
|
|||||||
*/
|
*/
|
||||||
private NumberInterface getLog2(NumberInterface number) {
|
private NumberInterface getLog2(NumberInterface number) {
|
||||||
NumberInterface maxError = getMaxError(number);
|
NumberInterface maxError = getMaxError(number);
|
||||||
//NumberInterface errorBound = (new NaiveNumber(1)).promoteTo(number.getClass());
|
//NumberInterface errorBound = fromInt(number.getClass(), 1);
|
||||||
//We'll use the series \sigma_{n >= 1) ((1/3^n + 1/4^n) * 1/n)
|
//We'll use the series \sigma_{n >= 1) ((1/3^n + 1/4^n) * 1/n)
|
||||||
//In the following, a=1/3^n, b=1/4^n, c = 1/n.
|
//In the following, a=1/3^n, b=1/4^n, c = 1/n.
|
||||||
//a is also an error bound.
|
//a is also an error bound.
|
||||||
NumberInterface a = (new NaiveNumber(1)).promoteTo(number.getClass()), b = a, c = a;
|
NumberInterface a = fromInt(number.getClass(), 1), b = a, c = a;
|
||||||
NumberInterface sum = NaiveNumber.ZERO.promoteTo(number.getClass());
|
NumberInterface sum = NaiveNumber.ZERO.promoteTo(number.getClass());
|
||||||
int n = 0;
|
int n = 0;
|
||||||
while (a.compareTo(maxError) >= 1) {
|
while (a.compareTo(maxError) >= 1) {
|
||||||
n++;
|
n++;
|
||||||
a = a.divide((new NaiveNumber(3)).promoteTo(number.getClass()));
|
a = a.divide(fromInt(number.getClass(), 3));
|
||||||
b = b.divide((new NaiveNumber(4)).promoteTo(number.getClass()));
|
b = b.divide(fromInt(number.getClass(), 4));
|
||||||
c = NaiveNumber.ONE.promoteTo(number.getClass()).divide((new NaiveNumber(n)).promoteTo(number.getClass()));
|
c = NaiveNumber.ONE.promoteTo(number.getClass()).divide((new NaiveNumber(n)).promoteTo(number.getClass()));
|
||||||
sum = sum.add(a.add(b).multiply(c));
|
sum = sum.add(a.add(b).multiply(c));
|
||||||
}
|
}
|
||||||
@@ -311,7 +316,7 @@ public class StandardPlugin extends Plugin {
|
|||||||
//right and left refer to lhs and rhs in the above inequality.
|
//right and left refer to lhs and rhs in the above inequality.
|
||||||
NumberInterface sum = NaiveNumber.ONE.promoteTo(params[0].getClass());
|
NumberInterface sum = NaiveNumber.ONE.promoteTo(params[0].getClass());
|
||||||
NumberInterface nextNumerator = params[0];
|
NumberInterface nextNumerator = params[0];
|
||||||
NumberInterface left = params[0].multiply((new NaiveNumber(3)).promoteTo(params[0].getClass()).intPow(params[0].ceiling().intValue())), right = maxError;
|
NumberInterface left = params[0].multiply(fromInt(params[0].getClass(), 3).intPow(params[0].ceiling().intValue())), right = maxError;
|
||||||
do {
|
do {
|
||||||
sum = sum.add(nextNumerator.divide(factorial(params[0].getClass(), n + 1)));
|
sum = sum.add(nextNumerator.divide(factorial(params[0].getClass(), n + 1)));
|
||||||
n++;
|
n++;
|
||||||
@@ -359,12 +364,12 @@ public class StandardPlugin extends Plugin {
|
|||||||
@Override
|
@Override
|
||||||
protected NumberInterface applyInternal(NumberInterface[] params) {
|
protected NumberInterface applyInternal(NumberInterface[] params) {
|
||||||
NumberInterface pi = getPi(params[0].getClass());
|
NumberInterface pi = getPi(params[0].getClass());
|
||||||
NumberInterface twoPi = pi.multiply(new NaiveNumber(2).promoteTo(pi.getClass()));
|
NumberInterface twoPi = pi.multiply(fromInt(pi.getClass(), 2));
|
||||||
NumberInterface theta = getSmallAngle(params[0], pi);
|
NumberInterface theta = getSmallAngle(params[0], pi);
|
||||||
//System.out.println(theta);
|
//System.out.println(theta);
|
||||||
if (theta.compareTo(pi.multiply(new NaiveNumber(1.5).promoteTo(twoPi.getClass()))) >= 0) {
|
if (theta.compareTo(pi.multiply(new NaiveNumber(1.5).promoteTo(twoPi.getClass()))) >= 0) {
|
||||||
theta = theta.subtract(twoPi);
|
theta = theta.subtract(twoPi);
|
||||||
} else if (theta.compareTo(pi.divide(new NaiveNumber(2).promoteTo(pi.getClass()))) > 0) {
|
} else if (theta.compareTo(pi.divide(fromInt(pi.getClass(), 2))) > 0) {
|
||||||
theta = pi.subtract(theta);
|
theta = pi.subtract(theta);
|
||||||
}
|
}
|
||||||
//System.out.println(theta);
|
//System.out.println(theta);
|
||||||
@@ -382,7 +387,7 @@ public class StandardPlugin extends Plugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected NumberInterface applyInternal(NumberInterface[] params) {
|
protected NumberInterface applyInternal(NumberInterface[] params) {
|
||||||
return functionSin.apply(getPi(params[0].getClass()).divide(new NaiveNumber(2).promoteTo(params[0].getClass()))
|
return functionSin.apply(getPi(params[0].getClass()).divide(fromInt(params[0].getClass(), 2))
|
||||||
.subtract(params[0]));
|
.subtract(params[0]));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -470,7 +475,7 @@ public class StandardPlugin extends Plugin {
|
|||||||
* @return the maximum error.
|
* @return the maximum error.
|
||||||
*/
|
*/
|
||||||
private static NumberInterface getMaxError(NumberInterface number) {
|
private static NumberInterface getMaxError(NumberInterface number) {
|
||||||
return (new NaiveNumber(10)).promoteTo(number.getClass()).intPow(-number.getMaxPrecision());
|
return fromInt(number.getClass(), 10).intPow(-number.getMaxPrecision());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -531,6 +536,22 @@ public class StandardPlugin extends Plugin {
|
|||||||
return theta;
|
return theta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a number of class numType with value n.
|
||||||
|
* @param numType class of number to return.
|
||||||
|
* @param n value of returned number.
|
||||||
|
* @return numClass instance with value n.
|
||||||
|
*/
|
||||||
|
private static NumberInterface fromInt(Class<? extends NumberInterface> numType, int n){
|
||||||
|
if(!integerValues.containsKey(numType)){
|
||||||
|
integerValues.put(numType, new HashMap<>());
|
||||||
|
}
|
||||||
|
if(!integerValues.get(numType).containsKey(n)){
|
||||||
|
integerValues.get(numType).put(n, new NaiveNumber(n).promoteTo(numType));
|
||||||
|
}
|
||||||
|
return integerValues.get(numType).get(n);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
registerNumberImplementation("naive", IMPLEMENTATION_NAIVE);
|
registerNumberImplementation("naive", IMPLEMENTATION_NAIVE);
|
||||||
|
|||||||
@@ -50,9 +50,7 @@
|
|||||||
<ListView fx:id="enabledPluginView"
|
<ListView fx:id="enabledPluginView"
|
||||||
GridPane.rowIndex="1" GridPane.columnIndex="0"
|
GridPane.rowIndex="1" GridPane.columnIndex="0"
|
||||||
GridPane.columnSpan="2" maxHeight="100"/>
|
GridPane.columnSpan="2" maxHeight="100"/>
|
||||||
<Text GridPane.columnIndex="0" GridPane.rowIndex="2" text="Computation Limit"/>
|
<FlowPane GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="2" hgap="10"
|
||||||
<TextField fx:id="computationLimitField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
|
||||||
<FlowPane GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="3" hgap="10"
|
|
||||||
vgap="10">
|
vgap="10">
|
||||||
<Button text="Apply" onAction="#performSave"/>
|
<Button text="Apply" onAction="#performSave"/>
|
||||||
<Button text="Reload Plugins" onAction="#performReload"/>
|
<Button text="Reload Plugins" onAction="#performReload"/>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import org.nwapw.abacus.tree.TreeNode;
|
|||||||
|
|
||||||
public class CalculationTests {
|
public class CalculationTests {
|
||||||
|
|
||||||
private static Abacus abacus = new Abacus(new Configuration(0, "precise", new String[]{}));
|
private static Abacus abacus = new Abacus(new Configuration("precise", new String[]{}));
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void prepareTests(){
|
public static void prepareTests(){
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class TokenizerTests {
|
public class TokenizerTests {
|
||||||
|
|
||||||
private static Abacus abacus = new Abacus(new Configuration(0, "precise", new String[]{}));
|
private static Abacus abacus = new Abacus(new Configuration("precise", new String[]{}));
|
||||||
private static LexerTokenizer lexerTokenizer = new LexerTokenizer();
|
private static LexerTokenizer lexerTokenizer = new LexerTokenizer();
|
||||||
private static Function subtractFunction = new Function() {
|
private static Function subtractFunction = new Function() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user