Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
potapenko committed Jul 31, 2019
0 parents commit 308b4ad
Show file tree
Hide file tree
Showing 856 changed files with 67,647 additions and 0 deletions.
822 changes: 822 additions & 0 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions project.clj
@@ -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"])
69 changes: 69 additions & 0 deletions src/core.clj
@@ -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])
37 changes: 37 additions & 0 deletions src/org/apache/commons/math4/Field.clj
@@ -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))))

73 changes: 73 additions & 0 deletions src/org/apache/commons/math4/FieldElement.clj
@@ -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))))

0 comments on commit 308b4ad

Please sign in to comment.