Hello there! A repository you're currently looking at was created for fun, but then we realized how useful it can be in the future for the developer's community! Once in a while we make some minor changes to this library :). With your help we can make it great!
Idea belongs to CalculusEnjoyer and stupidcucumber
Our library contain functionality to deal with:
- Complex numbers
- Matrices
- Vectors
- Primitive geometry objects, such as: points, lines, planes of any dimension
- Limited functionality for curves in 2D-space
Our library adds a new ComplexNumber
class, which contains all the necessary methods for working with complex numbers.
returns the real part of a complex number.
returns the imaginary part of a complex number.
sets the real part of a complex number.
sets the imaginary part of a complex number.
returns the magnitude of a complex number.
sends a complex number to the standard output.
returns all roots of a given complex number. not implemented
a bunch of methods to make work with complex numbers easier.
The library also provides some useful global functions:
multiplies a complex number by a given real coefficient.
returns the conjugate of a complex number.
returns the multiplicative inverse version of a complex number.
Provides two different classes for work with complex Matrix cMatrix
and real Matrix Matrix
. They contain the following methods:
sends the matrix to the standard output.
clears the matrix.
returns the number of rows and columns accordingly.
returns the matrix by reference.
returns the rank of a real / complex matrix.
returns the rank of an extended matrix.
assigns random values to a matrix between minimum and maximum values.
assigns specific values to a matrix.
swaps columns.
swaps rows.
transposes the matrix of an arbitrary size.
makes upper (if f = false) or lower triangular matrix.
returns the determinant of a matrix, if it is square matrix.
returns the matrix (represented as vector<vector<long double>>
rather than object of type Matrix/cMatrix) multiplied from right or left by a given matrix.
returns the inverse matrix.
returns the solution to the corresponding linear equation system.
returns a general solution to a corresponding linear equation system.
a bunch of operators (-, +, *, /, ^) to make work with matrices easier.
Also there are some useful functions:
matrixProduct(vector<vector> m1, vector<vector> m2, bool side = false) ⟹ vector<vector<long double>>
returns the product of matrices.
sends the matrix to the standard output.
The following functions are included:
returns the length of the given vector.
returns the vector as a result of a multiplication of two vectors.
returns a scalar product of a vectors.
returns the angle between vectors.
adds two vectors and returns corresponding vector.
subtracts two vectors and returns corresponding vector.
returns the normalized vector.
Primitive objects include points, lines and planes. Functionality for working with points:
returns true if all given points lie on one line.
returns true if all given points lie on one plane.
Class Line
provides following methods:
returns the direct vector of a line.
returns the point of a line. not implemented (?)
returns true if point belongs to a line.
returns true if a given line is perpendicular.
returns true if a given line is parallel.
returns true if lines are on one plane.
returns true if lines cross.
Class 'Plane' provides following methods:
returns the direct vector of a plane.
returns the point of a plane.
returns true if a given line is parallel to the plane.
returns true if a given plane is parallel to the plane.
returns true if a given line is perpendicular to the plane.
checks whether the point belong to a plane.
Primitive objects also have functions:
returns the point of cross.
Currently we are working on it and trying to learn more about shapes in multidimensional space. Our library works only with ellipse and provides class "Ellipsoid" which contains such methods:
checks whether the equation is canonic.
checks whether the point belongs to the ellipse.
returns the eccentricity of the ellipse.
returns the directrix of the ellipse.
- Make faster algorithms.
- Include functions for working with multidimensional figures.
- Implement UI for drawing graphs and working with 3D and 2D figures.
Our main goal is to make a reliable library which can help modeling/solving complex mathematical problems. Every mathematician needs a simple but powerful tool to work with numbers. By building such a tool we can help the scientific community in further maths exploration.