Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 308b4ad
Showing
856 changed files
with
67,647 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(defproject clojure-interop/apache-commons-math "1.0.0" | ||
:description "Clojure to Java Interop Bindings for apache-commons-math" | ||
:url "https://github.com/clojure-interop/apache-commons-math" | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html"} | ||
:dependencies [[org.clojure/clojure "1.8.0"]] | ||
:source-paths ["src"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
(ns core | ||
(:refer-clojure :only [require comment defn ->]) | ||
(:import )) | ||
|
||
(require '[org.apache.commons.math4.core]) | ||
(require '[org.apache.commons.math4.analysis.core]) | ||
(require '[org.apache.commons.math4.analysis.differentiation.core]) | ||
(require '[org.apache.commons.math4.analysis.function.core]) | ||
(require '[org.apache.commons.math4.analysis.integration.core]) | ||
(require '[org.apache.commons.math4.analysis.integration.gauss.core]) | ||
(require '[org.apache.commons.math4.analysis.interpolation.core]) | ||
(require '[org.apache.commons.math4.analysis.polynomials.core]) | ||
(require '[org.apache.commons.math4.analysis.solvers.core]) | ||
(require '[org.apache.commons.math4.complex.core]) | ||
(require '[org.apache.commons.math4.dfp.core]) | ||
(require '[org.apache.commons.math4.distribution.core]) | ||
(require '[org.apache.commons.math4.distribution.fitting.core]) | ||
(require '[org.apache.commons.math4.exception.core]) | ||
(require '[org.apache.commons.math4.exception.util.core]) | ||
(require '[org.apache.commons.math4.filter.core]) | ||
(require '[org.apache.commons.math4.fitting.core]) | ||
(require '[org.apache.commons.math4.fitting.leastsquares.core]) | ||
(require '[org.apache.commons.math4.fraction.core]) | ||
(require '[org.apache.commons.math4.genetics.core]) | ||
(require '[org.apache.commons.math4.geometry.core]) | ||
(require '[org.apache.commons.math4.geometry.enclosing.core]) | ||
(require '[org.apache.commons.math4.geometry.euclidean.oned.core]) | ||
(require '[org.apache.commons.math4.geometry.euclidean.threed.core]) | ||
(require '[org.apache.commons.math4.geometry.euclidean.twod.core]) | ||
(require '[org.apache.commons.math4.geometry.euclidean.twod.hull.core]) | ||
(require '[org.apache.commons.math4.geometry.hull.core]) | ||
(require '[org.apache.commons.math4.geometry.partitioning.core]) | ||
(require '[org.apache.commons.math4.geometry.spherical.oned.core]) | ||
(require '[org.apache.commons.math4.geometry.spherical.twod.core]) | ||
(require '[org.apache.commons.math4.linear.core]) | ||
(require '[org.apache.commons.math4.ml.clustering.core]) | ||
(require '[org.apache.commons.math4.ml.clustering.evaluation.core]) | ||
(require '[org.apache.commons.math4.ml.distance.core]) | ||
(require '[org.apache.commons.math4.ml.neuralnet.core]) | ||
(require '[org.apache.commons.math4.ml.neuralnet.oned.core]) | ||
(require '[org.apache.commons.math4.ml.neuralnet.sofm.core]) | ||
(require '[org.apache.commons.math4.ml.neuralnet.sofm.util.core]) | ||
(require '[org.apache.commons.math4.ml.neuralnet.twod.core]) | ||
(require '[org.apache.commons.math4.ml.neuralnet.twod.util.core]) | ||
(require '[org.apache.commons.math4.ode.core]) | ||
(require '[org.apache.commons.math4.ode.events.core]) | ||
(require '[org.apache.commons.math4.ode.nonstiff.core]) | ||
(require '[org.apache.commons.math4.ode.sampling.core]) | ||
(require '[org.apache.commons.math4.optim.core]) | ||
(require '[org.apache.commons.math4.optim.linear.core]) | ||
(require '[org.apache.commons.math4.optim.nonlinear.scalar.core]) | ||
(require '[org.apache.commons.math4.optim.nonlinear.scalar.gradient.core]) | ||
(require '[org.apache.commons.math4.optim.nonlinear.scalar.noderiv.core]) | ||
(require '[org.apache.commons.math4.optim.univariate.core]) | ||
(require '[org.apache.commons.math4.primes.core]) | ||
(require '[org.apache.commons.math4.random.core]) | ||
(require '[org.apache.commons.math4.special.core]) | ||
(require '[org.apache.commons.math4.stat.core]) | ||
(require '[org.apache.commons.math4.stat.correlation.core]) | ||
(require '[org.apache.commons.math4.stat.descriptive.core]) | ||
(require '[org.apache.commons.math4.stat.descriptive.moment.core]) | ||
(require '[org.apache.commons.math4.stat.descriptive.rank.core]) | ||
(require '[org.apache.commons.math4.stat.descriptive.summary.core]) | ||
(require '[org.apache.commons.math4.stat.inference.core]) | ||
(require '[org.apache.commons.math4.stat.interval.core]) | ||
(require '[org.apache.commons.math4.stat.ranking.core]) | ||
(require '[org.apache.commons.math4.stat.regression.core]) | ||
(require '[org.apache.commons.math4.transform.core]) | ||
(require '[org.apache.commons.math4.util.core]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
(ns org.apache.commons.math4.Field | ||
"Interface representing a field. | ||
Classes implementing this interface will often be singletons." | ||
(:refer-clojure :only [require comment defn ->]) | ||
(:import [org.apache.commons.math4 Field])) | ||
|
||
(defn get-zero | ||
"Get the additive identity of the field. | ||
The additive identity is the element e0 of the field such that | ||
for all elements a of the field, the equalities a e0 = | ||
e0 a = a hold. | ||
returns: additive identity of the field - `T`" | ||
([^Field this] | ||
(-> this (.getZero)))) | ||
|
||
(defn get-one | ||
"Get the multiplicative identity of the field. | ||
The multiplicative identity is the element e1 of the field such that | ||
for all elements a of the field, the equalities a × e1 = | ||
e1 × a = a hold. | ||
returns: multiplicative identity of the field - `T`" | ||
([^Field this] | ||
(-> this (.getOne)))) | ||
|
||
(defn get-runtime-class | ||
"Returns the runtime class of the FieldElement. | ||
returns: The Class object that represents the runtime | ||
class of this object. - `java.lang.Class<? extends org.apache.commons.math4.FieldElement<T>>`" | ||
([^Field this] | ||
(-> this (.getRuntimeClass)))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
(ns org.apache.commons.math4.FieldElement | ||
"Interface representing field elements." | ||
(:refer-clojure :only [require comment defn ->]) | ||
(:import [org.apache.commons.math4 FieldElement])) | ||
|
||
(defn add | ||
"Compute this a. | ||
a - element to add - `T` | ||
returns: a new element representing this a - `T` | ||
throws: org.apache.commons.math4.exception.NullArgumentException - if a is null." | ||
([^FieldElement this a] | ||
(-> this (.add a)))) | ||
|
||
(defn subtract | ||
"Compute this - a. | ||
a - element to subtract - `T` | ||
returns: a new element representing this - a - `T` | ||
throws: org.apache.commons.math4.exception.NullArgumentException - if a is null." | ||
([^FieldElement this a] | ||
(-> this (.subtract a)))) | ||
|
||
(defn negate | ||
"Returns the additive inverse of this element. | ||
returns: the opposite of this. - `T`" | ||
([^FieldElement this] | ||
(-> this (.negate)))) | ||
|
||
(defn multiply | ||
"Compute n × this. Multiplication by an integer number is defined | ||
as the following sum | ||
n × this = ∑i=1n this. | ||
n - Number of times this must be added to itself. - `int` | ||
returns: A new element representing n × this. - `T`" | ||
([^FieldElement this ^Integer n] | ||
(-> this (.multiply n)))) | ||
|
||
(defn divide | ||
"Compute this ÷ a. | ||
a - element to divide by - `T` | ||
returns: a new element representing this ÷ a - `T` | ||
throws: org.apache.commons.math4.exception.NullArgumentException - if a is null." | ||
([^FieldElement this a] | ||
(-> this (.divide a)))) | ||
|
||
(defn reciprocal | ||
"Returns the multiplicative inverse of this element. | ||
returns: the inverse of this. - `T` | ||
throws: org.apache.commons.math4.exception.MathArithmeticException - if this is zero" | ||
([^FieldElement this] | ||
(-> this (.reciprocal)))) | ||
|
||
(defn get-field | ||
"Get the Field to which the instance belongs. | ||
returns: Field to which the instance belongs - `org.apache.commons.math4.Field<T>`" | ||
(^org.apache.commons.math4.Field [^FieldElement this] | ||
(-> this (.getField)))) | ||
|
Oops, something went wrong.