commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1383287 - in /commons/proper/math/trunk/src/site/design: ./ differentiation.puml oneD.puml partitioning.puml solver.puml threeD.puml twoD.puml
Date Tue, 11 Sep 2012 08:37:53 GMT
Author: luc
Date: Tue Sep 11 08:37:52 2012
New Revision: 1383287

URL: http://svn.apache.org/viewvc?rev=1383287&view=rev
Log:
added a few UML diagrams.
The diagrams are not used in the documentation yet, they are only kept for reference and may
be removed later.

Added:
    commons/proper/math/trunk/src/site/design/
    commons/proper/math/trunk/src/site/design/differentiation.puml
    commons/proper/math/trunk/src/site/design/oneD.puml
    commons/proper/math/trunk/src/site/design/partitioning.puml
    commons/proper/math/trunk/src/site/design/solver.puml
    commons/proper/math/trunk/src/site/design/threeD.puml
    commons/proper/math/trunk/src/site/design/twoD.puml

Added: commons/proper/math/trunk/src/site/design/differentiation.puml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/design/differentiation.puml?rev=1383287&view=auto
==============================================================================
--- commons/proper/math/trunk/src/site/design/differentiation.puml (added)
+++ commons/proper/math/trunk/src/site/design/differentiation.puml Tue Sep 11 08:37:52 2012
@@ -0,0 +1,105 @@
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'      http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+@startuml
+
+  skinparam svek                  true
+  skinparam ClassBackgroundColor  #F3EFEB
+  skinparam ClassArrowColor       #691616
+  skinparam ClassBorderColor      #691616
+  skinparam NoteBackgroundColor   #F3EFEB
+  skinparam NoteBorderColor       #691616
+  skinparam NoteFontColor         #691616
+  skinparam ClassFontSize         11
+
+  package org.apache.commons.math3 #ECEBD8
+
+    interface "FieldElement<T>" as FieldElement_T_ {
+      T add(T a)
+      T subtract(T a)
+      T negate()
+      T multiply(int n)
+      T multiply(T a)
+      T divide(T a)
+      T reciprocal()
+      Field<T> getField()
+    }
+
+    package analysis #DDEBD8
+      interface UnivariateFunction {
+        double value(double x)
+      }
+
+      package differentiation #DDDBD8
+
+        class DerivativeStructure {
+          -DerivativeStructure(DSCompiler compiler)
+          +DerivativeStructure(int parameters, int order, double value)
+          +DerivativeStructure(int parameters, int order, int index, double value)
+          +int getFreeParameters()
+          +int getOrder()
+          +double getValue()
+          +double getPartialDerivative(int[] orders)
+          +double taylor(double[] delta)
+          +int getExponent()
+          +DerivativeStructure compose(double[] f)
+          +DerivativeStructure cos()
+          +DerivativeStructure sin()
+          +DerivativeStructure exp()
+          +DerivativeStructure sqrt()
+        }
+        note bottom
+          lots of mathematical methods
+          and constructors ommitted for clarity
+        end note
+
+        class DSCompiler {
+          {static} +DSCompiler getCompiler(int parameters, int order)
+          +int getPartialDerivativeIndex(int[] orders)
+          +int[] getPartialDerivativeOrders(int index)
+          +int getFreeParameters()
+          +int getOrder()
+          +int getSize()
+          +void checkCompatibility(DSCompiler compiler)
+          +void compose(double[] operand, int operandOffset, double[] f, double[] result,
int resultOffset)
+          +double taylor(double[] ds, int dsOffset, double[] delta)
+          +void add(double[] lhs, int lhsOffset, double[] rhs, int rhsOffset, double[] result,
int resultOffset)
+          +void exp(double[] operand, int operandOffset, double[] result, int resultOffset)
+        }
+        note bottom
+          one compiler is built for each pair
+          (number of parameters, derivation order)
+          they are cached for efficiency
+        end note
+
+        interface UnivariateDifferentiable {
+          DerivativeStructure value(DerivativeStructure t)
+        }
+
+        interface UnivariateDifferentiator {
+          UnivariateDifferentiable differentiate(UnivariateFunction function)
+        }
+
+        FieldElement_T_     <..      DerivativeStructure
+        DerivativeStructure o--> "1" DSCompiler : delegates computation
+        UnivariateFunction  <|..     UnivariateDifferentiable
+        UnivariateDifferentiable <-- UnivariateDifferentiator : creates
+        UnivariateDifferentiable --> DerivativeStructure : uses
+
+      end package
+    end package
+  end package
+
+@enduml

Added: commons/proper/math/trunk/src/site/design/oneD.puml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/design/oneD.puml?rev=1383287&view=auto
==============================================================================
--- commons/proper/math/trunk/src/site/design/oneD.puml (added)
+++ commons/proper/math/trunk/src/site/design/oneD.puml Tue Sep 11 08:37:52 2012
@@ -0,0 +1,81 @@
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'      http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+@startuml
+
+  skinparam svek                  true
+  skinparam ClassBackgroundColor  #F3EFEB
+  skinparam ClassArrowColor       #691616
+  skinparam ClassBorderColor      #691616
+  skinparam NoteBackgroundColor   #F3EFEB
+  skinparam NoteBorderColor       #691616
+  skinparam NoteFontColor         #691616
+  skinparam ClassFontSize         11
+
+  package org.apache.commons.math3.geometry #ECEBD8
+
+    interface Space {
+      +int getDimension()
+      +Space getSubSpace()
+    }
+    note top
+      Space is mainly used as a parameter
+      for generics and to link d-dimensional
+      space with (d-1)-dimensional space
+    end note
+
+    interface "Vector<S extends Space>" as Vector_S_ {
+      +Space getSpace()
+      +Vector getZero()
+      +double getNorm()
+      +Vector add()
+      +Vector subtract()
+      +Vector negate()
+      +Vector normalize()
+      +Vector scalarMultiply()
+      +boolean isNaN()
+      +boolean isInfinite()
+      +double distance()
+      +double dotProduct()
+    }
+
+    Space <-- Vector_S_
+
+    package partitioning #DDEBD8
+      interface "Region<S extends Space>" as Region_S_
+      interface "Hyperplane<S extends Space>" as Hyperplane_S_
+      interface "SubHyperplane<S extends Space>" as SubHyperplane_S_
+    end package
+
+    package euclidean #DDEBD8
+
+      package oned #DDDBD8
+
+        class Euclidean1D
+        class OrientedPoint
+        class Interval
+        class IntervalSet
+
+        Space       <|.. Euclidean1D
+        Vector_S_   <|.. OrientedPoint
+        Region_S_   <|.. IntervalSet
+
+      end package
+
+    end package
+
+  end package
+
+@enduml

Added: commons/proper/math/trunk/src/site/design/partitioning.puml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/design/partitioning.puml?rev=1383287&view=auto
==============================================================================
--- commons/proper/math/trunk/src/site/design/partitioning.puml (added)
+++ commons/proper/math/trunk/src/site/design/partitioning.puml Tue Sep 11 08:37:52 2012
@@ -0,0 +1,119 @@
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'      http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+@startuml
+
+  skinparam svek                  true
+  skinparam ClassBackgroundColor  #F3EFEB
+  skinparam ClassArrowColor       #691616
+  skinparam ClassBorderColor      #691616
+  skinparam NoteBackgroundColor   #F3EFEB
+  skinparam NoteBorderColor       #691616
+  skinparam NoteFontColor         #691616
+  skinparam ClassFontSize         11
+
+  package org.apache.commons.math3.geometry #ECEBD8
+
+    package partitioning #DDEBD8
+
+      abstract "AbstractSubHyperplane<S extends Space, T extends Space>" as AbstractSubHyperplane_S_T_
+      note left
+        an abstract sub-hyperplane contains
+         - an hyperplane defined in space S
+         - a region defined in space T
+        T being a sub-space of S
+      end note
+
+      interface "Hyperplane<S extends Space>" as Hyperplane_S_ {
+        +double getOffset(Vector point)
+        +boolean sameOrientationAs(Hyperplane other)
+        +SubHyperplane wholeHyperplane()
+        +Region wholeSpace()
+      }
+
+      interface "SubHyperplane<S extends Space>" as SubHyperplane_S_ {
+        +Hyperplane getHyperplane()
+        +boolean isEmpty()
+        +double getSize()
+        +Side side(Hyperplane hyperplane)
+        +SplitSubHyperplane split(Hyperplane hyperplane)
+        +SubHyperplane reunite(SubHyperplane other)
+      }
+
+      class "BSPTree<S extends Space>" as BSPTree_S_ {
+        +boolean insertCut(Hyperplane hyperplane)
+        +void setAttribute(Object attribute)
+        +Object getAttribute()
+        +void visit(BSPTreeVisitor visitor)
+        +BSPTree getCell(Vector point)
+        +BSPTree split(SubHyperplane sub)
+      }
+
+      interface "BSPTreeVisitor<S extends Space>" as BSPTreeVisitor_S_ {
+        +Order visitOrder(BSPTree node)
+        +void visitInternalNode(BSPTree node)
+        +void visitLeafNode(BSPTree node)
+      }
+
+      interface "Region<S extends Space>" as Region_S_ {
+        +boolean isEmpty()
+        +boolean contains(Region region)
+        +Location checkPoint(Vector point)
+        +double getBoundarySize()
+        +double getSize()
+        +Vector getBarycenter()
+        +Side side(Hyperplane hyperplane)
+        +SubHyperplane intersection(SubHyperplane sub)
+      }
+      note top
+        a region is a part of the space
+        it may be empty,
+        it may cover the whole space,
+        it may have infinite non-closed boudaries,
+        it may be in several disconnected sub-parts,
+        it may contain holes
+      end note
+
+      enum Location {
+        +INSIDE
+        +OUTSIDE
+        +BOUNDARY
+      }
+
+      enum Side {
+        +PLUS
+        +MINUS
+        +BOTH
+        +HYPER
+      }
+
+      Hyperplane_S_ "1" <--* "1" SubHyperplane_S_
+      SubHyperplane_S_ "0..1" <--* BSPTree_S_ : cut
+      BSPTree_S_ <--o BSPTree_S_ : "parent      "
+      BSPTree_S_ o--> BSPTree_S_ : "children"
+      Region_S_ *-->  "1" BSPTree_S_
+      Hyperplane_S_  <-- Region_S_
+      AbstractSubHyperplane_S_T_ ..|> SubHyperplane_S_
+      AbstractSubHyperplane_S_T_ *--> "1" Hyperplane_S_ : hyperplane
+      AbstractSubHyperplane_S_T_ *--> "1" Region_S_ : region
+      Region_S_ --> Location
+      Region_S_ --> Side
+      BSPTree_S_ <-- BSPTreeVisitor_S_ : visits
+
+    end package
+
+  end package
+
+@enduml

Added: commons/proper/math/trunk/src/site/design/solver.puml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/design/solver.puml?rev=1383287&view=auto
==============================================================================
--- commons/proper/math/trunk/src/site/design/solver.puml (added)
+++ commons/proper/math/trunk/src/site/design/solver.puml Tue Sep 11 08:37:52 2012
@@ -0,0 +1,102 @@
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'      http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+@startuml
+
+  skinparam svek                  true
+  skinparam ClassBackgroundColor  #F3EFEB
+  skinparam ClassArrowColor       #691616
+  skinparam ClassBorderColor      #691616
+  skinparam NoteBackgroundColor   #F3EFEB
+  skinparam NoteBorderColor       #691616
+  skinparam NoteFontColor         #691616
+  skinparam ClassFontSize         11
+
+  package org.apache.commons.math3.differentiation.solvers #ECEBD8
+
+        enum AllowedSolution {
+          ANY_SIDE
+          LEFT_SIDE
+          RIGHT_SIDE
+          BELOW_SIDE
+          ABOVE_SIDE
+        }
+
+        interface "BaseUnivariateSolver<FUNC extends UnivariateFunction>" as BaseUnivariateSolver_FUNC_
{
+          +int getMaxEvaluations()
+          +int getEvaluations()
+          +double getAbsoluteAccuracy()
+          +double getRelativeAccuracy()
+          +double getFunctionValueAccuracy()
+          +double solve(int maxEval, FUNC f, double min, double max)
+          +double solve(int maxEval, FUNC f, double min, double max, double startValue)
+          +double solve(int maxEval, FUNC f, double startValue)
+        }
+
+        abstract class "BaseAbstractUnivariateSolver<FUNC extends UnivariateFunction>"
as BaseAbstractUnivariateSolver_FUNC_ {
+          #{Abstract} double doSolve()
+        }
+
+        interface UnivariateSolver
+        abstract class AbstractUnivariateSolver
+
+        interface DifferentiableUnivariateSolver
+        abstract class AbstractDifferentiableUnivariateSolver
+
+        interface PolynomialSolver
+        abstract class AbstractPolynomialSolver
+
+        BaseUnivariateSolver_FUNC_         <|.. BaseAbstractUnivariateSolver_FUNC_
+
+        BaseUnivariateSolver_FUNC_         <|.. UnivariateSolver
+        UnivariateSolver                   <|.. AbstractUnivariateSolver
+        BaseAbstractUnivariateSolver_FUNC_ <|-- AbstractUnivariateSolver
+
+        BaseUnivariateSolver_FUNC_         <|.. DifferentiableUnivariateSolver
+        DifferentiableUnivariateSolver     <|.. AbstractDifferentiableUnivariateSolver
+        BaseAbstractUnivariateSolver_FUNC_ <|-- AbstractDifferentiableUnivariateSolver
+
+        BaseUnivariateSolver_FUNC_         <|.. PolynomialSolver
+        PolynomialSolver                   <|.. AbstractPolynomialSolver
+        BaseAbstractUnivariateSolver_FUNC_ <|-- AbstractPolynomialSolver
+
+
+interface "BracketedUnivariateSolver<FUNC extends UnivariateFunction>" as  BracketedUnivariateSolver_FUNC_
+AllowedSolution <-- BracketedUnivariateSolver_FUNC_ : solution side selector
+BaseUnivariateSolver_FUNC_ <|.. BracketedUnivariateSolver_FUNC_
+
+abstract class BaseSecantSolver
+
+ AbstractUnivariateSolver <|-- BaseSecantSolver
+ BracketedUnivariateSolver_FUNC_ <|.. BaseSecantSolver
+ BaseSecantSolver <|-- IllinoisSolver
+ BaseSecantSolver <|-- PegasusSolver
+ BaseSecantSolver <|-- RegulaFalsiSolver
+
+ AbstractUnivariateSolver <|-- BracketingNthOrderBrentSolver
+ BracketedUnivariateSolver_FUNC_ <|.. BracketingNthOrderBrentSolver
+
+ AbstractUnivariateSolver <|-- BrentSolver
+ AbstractUnivariateSolver <|-- SecantSolver
+ AbstractUnivariateSolver <|-- RiddersSolver
+ AbstractUnivariateSolver <|-- MullerSolver
+ AbstractUnivariateSolver <|-- MullerSolver2
+ AbstractDifferentiableUnivariateSolver <|-- NewtonSolver
+AbstractPolynomialSolver <|-- LaguerreSolver
+
+AbstractUnivariateSolver <|-- BisectionSolver
+  end package
+
+@enduml

Added: commons/proper/math/trunk/src/site/design/threeD.puml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/design/threeD.puml?rev=1383287&view=auto
==============================================================================
--- commons/proper/math/trunk/src/site/design/threeD.puml (added)
+++ commons/proper/math/trunk/src/site/design/threeD.puml Tue Sep 11 08:37:52 2012
@@ -0,0 +1,86 @@
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'      http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+@startuml
+
+  skinparam svek                  true
+  skinparam ClassBackgroundColor  #F3EFEB
+  skinparam ClassArrowColor       #691616
+  skinparam ClassBorderColor      #691616
+  skinparam NoteBackgroundColor   #F3EFEB
+  skinparam NoteBorderColor       #691616
+  skinparam NoteFontColor         #691616
+  skinparam ClassFontSize         11
+
+  package org.apache.commons.math3.geometry #ECEBD8
+
+    interface Space {
+      +int getDimension()
+      +Space getSubSpace()
+    }
+    note top
+      Space is mainly used as a parameter
+      for generics and to link d-dimensional
+      space with (d-1)-dimensional space
+    end note
+
+    interface "Vector<S extends Space>" as Vector_S_ {
+      +Space getSpace()
+      +Vector getZero()
+      +double getNorm()
+      +Vector add()
+      +Vector subtract()
+      +Vector negate()
+      +Vector normalize()
+      +Vector scalarMultiply()
+      +boolean isNaN()
+      +boolean isInfinite()
+      +double distance()
+      +double dotProduct()
+    }
+
+    Space <-- Vector_S_
+
+    package partitioning #DDEBD8
+      interface "Region<S extends Space>" as Region_S_
+      interface "Hyperplane<S extends Space>" as Hyperplane_S_
+      interface "SubHyperplane<S extends Space>" as SubHyperplane_S_
+    end package
+
+    package euclidean #DDEBD8
+
+      package threed #DDDBD8
+
+        class Euclidean3D
+        class Vector3D
+        class Line
+        class SubLine
+        class Plane
+        class SubPlane
+        class PolyhedronsSet
+
+        Space            <|.. Euclidean3D
+        Vector_S_        <|.. Vector3D
+        Hyperplane_S_    <|.. Plane
+        SubHyperplane_S_ <|.. SubPlane
+        Region_S_        <|.. PolyhedronsSet
+
+      end package
+
+    end package
+
+  end package
+
+@enduml

Added: commons/proper/math/trunk/src/site/design/twoD.puml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/design/twoD.puml?rev=1383287&view=auto
==============================================================================
--- commons/proper/math/trunk/src/site/design/twoD.puml (added)
+++ commons/proper/math/trunk/src/site/design/twoD.puml Tue Sep 11 08:37:52 2012
@@ -0,0 +1,84 @@
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'      http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+@startuml
+
+  skinparam svek                  true
+  skinparam ClassBackgroundColor  #F3EFEB
+  skinparam ClassArrowColor       #691616
+  skinparam ClassBorderColor      #691616
+  skinparam NoteBackgroundColor   #F3EFEB
+  skinparam NoteBorderColor       #691616
+  skinparam NoteFontColor         #691616
+  skinparam ClassFontSize         11
+
+  package org.apache.commons.math3.geometry #ECEBD8
+
+    interface Space {
+      +int getDimension()
+      +Space getSubSpace()
+    }
+    note top
+      Space is mainly used as a parameter
+      for generics and to link d-dimensional
+      space with (d-1)-dimensional space
+    end note
+
+    interface "Vector<S extends Space>" as Vector_S_ {
+      +Space getSpace()
+      +Vector getZero()
+      +double getNorm()
+      +Vector add()
+      +Vector subtract()
+      +Vector negate()
+      +Vector normalize()
+      +Vector scalarMultiply()
+      +boolean isNaN()
+      +boolean isInfinite()
+      +double distance()
+      +double dotProduct()
+    }
+
+    Space <-- Vector_S_
+
+    package partitioning #DDEBD8
+      interface "Region<S extends Space>" as Region_S_
+      interface "Hyperplane<S extends Space>" as Hyperplane_S_
+      interface "SubHyperplane<S extends Space>" as SubHyperplane_S_
+    end package
+
+    package euclidean #DDEBD8
+
+      package twod #DDDBD8
+
+        class Euclidean2D
+        class Vector2D
+        class Line
+        class SubLine
+        class PolygonsSet
+
+        Space            <|.. Euclidean2D
+        Vector_S_        <|.. Vector2D
+        Hyperplane_S_    <|.. Line
+        SubHyperplane_S_ <|.. SubLine
+        Region_S_        <|.. PolygonsSet
+
+      end package
+
+    end package
+
+  end package
+
+@enduml



Mime
View raw message