mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-25 08:05:19 +00:00
Compare commits
8 Commits
thread-saf
...
fixes
| Author | SHA1 | Date | |
|---|---|---|---|
| e430e738cf | |||
| f6e326e0f1 | |||
| 07581557c7 | |||
| 14ac9c67f4 | |||
| 0ff071e212 | |||
| 88e3bb7109 | |||
| 540e5d6099 | |||
| c9e93d87a2 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -24,7 +24,9 @@ hs_err_pid*
|
||||
# Custom Stuff
|
||||
# Gradle
|
||||
.gradle/*
|
||||
build/*
|
||||
**/build/*
|
||||
**/out/**
|
||||
**/.DS_Store
|
||||
|
||||
# IntelliJ
|
||||
.idea/*
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.nwapw.abacus.exception.ComputationInterruptedException;
|
||||
/**
|
||||
* An interface used to represent a number.
|
||||
*/
|
||||
public abstract class NumberInterface {
|
||||
public abstract class NumberInterface implements Comparable<NumberInterface> {
|
||||
|
||||
/**
|
||||
* Check if the thread was interrupted and
|
||||
@@ -158,14 +158,6 @@ public abstract class NumberInterface {
|
||||
return intPowInternal(exponent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this number to another.
|
||||
*
|
||||
* @param number the number to compare to.
|
||||
* @return same as Integer.compare();
|
||||
*/
|
||||
public abstract int compareTo(NumberInterface number);
|
||||
|
||||
/**
|
||||
* Same as Math.signum().
|
||||
*
|
||||
|
||||
@@ -68,6 +68,7 @@ class Abacus(val configuration: Configuration) {
|
||||
pluginManager.reload()
|
||||
with(mutableContext) {
|
||||
numberImplementation = pluginManager.numberImplementationFor(configuration.numberImplementation)
|
||||
?: StandardPlugin.IMPLEMENTATION_NAIVE
|
||||
clearVariables()
|
||||
clearDefinitions()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user