Mathematics (Package) - singa-bio/singa GitHub Wiki
The mathematics package is designed for the convenient and uniform handling of everything mathematical.
Concepts
The most important interfaces of this package. We try to implement mathematical concepts such as addition, subtraction and inversion as interfaces to allow for unrestricted implementation of those concepts for usage in vectors, matrices, scalars, and so on. Those interfaces also provide default convenience methods, that are for instance able to sum over vectors or matrices.
Vectors
Multidimensional vectors and convenience classes for Scalars(1D), 2D and 3D are provided. Calculations are implemented as concepts.
Matrices
Different matrix classes are defined to represent often used attributes (e.g. square and symmetric matrices). The different classes can freely be converted into each other. They also operate concept based and can be used in combination with vectors.
Metrics
The metrics package provides interfaces to implement different metrics that can be applied to metrizable objects. Implementations are provided for angular distance, cosine similarity, jaccard metric, minkowski metric (e.g. euclidean and manhattan) for vectors, and the shortest path metric for graphs. The metric provider supplies static ready to use metrics.
Geometry
The implemented section of geometrical objects is not only intended for rendering but also for calculation. You are able to retrieve points from parabolas or lines, calculate intersections and request certain attributes.
Graphs
Graphs are collections of objects that are connected by edges (as we a sure you all know). Nodes are modeled to "know" their neighbors and have a position, that can or cannot be assigned. Some simple graph oriented calculations can be done.