Class Index | File Index

Classes


Namespace JXG.Math


Defined in: Math.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Math namespace.
Field Summary
Field Attributes Field Name and Description
<static>  
JXG.Math.eps
eps defines the closeness to zero.
<static>  
JXG.Math.Geometry
Math.Geometry namespace definition
<static>  
JXG.Math.Statistics
Functions for mathematical statistics Most functions are R-like: For example prod(a1,a2) computes an array c such that for (i=0;i
Method Summary
Method Attributes Method Name and Description
<static>  
JXG.Math.binomial(n, k)
Computes the binomial coefficient n over k.
<static>  
JXG.Math.cosh(x)
Calculates the cosine hyperbolicus of x.
<static>  
JXG.Math.crossProduct(c1, c2)
Calculates the cross product of two vectors both of length three.
<static>  
JXG.Math.factorial(n)
Compute the factorial of a positive integer.
<static>  
JXG.Math.identity(n, m)
Generates an identity matrix.
<static>  
JXG.Math.innerProduct(a, b, n)
Inner product of two vectors a and b.
<static>  
JXG.Math.inverse(Ain)
Compute the inverse of an nxn matrix with Gauss elimination.
<static>  
JXG.Math.matMatMult(mat1, mat2)
Computes the product of the two matrices mat1*mat2.
<static>  
JXG.Math.matrix(n, m, init)
Initializes a matrix as an array of rows with the given value.
<static>  
JXG.Math.matVecMult(mat, vec)
Multiplies a vector vec to a matrix mat: mat * vec.
<static>  
JXG.Math.pow(base, exponent)
Compute base to the power of exponent.
<static>  
JXG.Math.sinh(x)
Sine hyperbolicus of x.
<static>  
JXG.Math.squampow(base, exponent)
A square & multiply algorithm to compute base to the power of exponent.
<static>  
JXG.Math.transpose(M)
Transposes a matrix given as a two dimensional array.
<static>  
JXG.Math.vector(n, init)
Initializes a vector as an array with the coefficients set to the given value resp.
Namespace Detail
JXG.Math
Math namespace.
Parameters:
JXG
Math
undefined
Field Detail
<static> {number} JXG.Math.eps
eps defines the closeness to zero. If the absolute value of a given number is smaller than eps, it is considered to be equal to zero.

<static> JXG.Math.Geometry
Math.Geometry namespace definition
Defined in: MathGeometry.js.

<static> JXG.Math.Statistics
Functions for mathematical statistics Most functions are R-like: For example prod(a1,a2) computes an array c such that for (i=0;i Defined in: MathStatistics.js.
Method Detail
<static> {Number} JXG.Math.binomial(n, k)
Computes the binomial coefficient n over k.
Parameters:
{Number} n
Fraction will be ignored
{Number} k
Fraction will be ignored
Returns:
{Number} The binomial coefficient n over k

<static> {Number} JXG.Math.cosh(x)
Calculates the cosine hyperbolicus of x.
Parameters:
{Number} x
The number the cosine hyperbolicus will be calculated of.
Returns:
{Number} Cosine hyperbolicus of the given value.

<static> {Array} JXG.Math.crossProduct(c1, c2)
Calculates the cross product of two vectors both of length three. In case of homogeneous coordinates this is either
Parameters:
{Array} c1
Homogeneous coordinates of line or point 1
{Array} c2
Homogeneous coordinates of line or point 2
Returns:
{Array} vector of length 3: homogeneous coordinates of the resulting point / line.

<static> {Number} JXG.Math.factorial(n)
Compute the factorial of a positive integer. If a non-integer value is given, the fraction will be ignored.
Parameters:
{Number} n
Returns:
{Number} n! = n*(n-1)*...*2*1

<static> {Array} JXG.Math.identity(n, m)
Generates an identity matrix. If n is a number and m is undefined or not a number, a square matrix is generated, if n and m are both numbers, an nxm matrix is generated.
Parameters:
{Number} n
Number of rows
{Number} m Optional, Default: n
Number of columns
Returns:
{Array} A square matrix of length n with all coefficients equal to 0 except a_(i,i), i out of (1, ..., n), if m is undefined or not a number or a n times m-matrix with a_(i,j) = 0 and a_(i,i) = 1 if m is a number.

<static> JXG.Math.innerProduct(a, b, n)
Inner product of two vectors a and b. n is the length of the vectors.
Parameters:
{Array} a
Vector
{Array} b
Vector
{Number} n Optional
Length of the Vectors. If not given the length of the first vector is taken.
Returns:
The inner product of a and b.

<static> {Array} JXG.Math.inverse(Ain)
Compute the inverse of an nxn matrix with Gauss elimination.
Parameters:
{Array} Ain
Returns:
{Array} Inverse matrix of Ain

<static> {Array} JXG.Math.matMatMult(mat1, mat2)
Computes the product of the two matrices mat1*mat2.
Parameters:
{Array} mat1
Two dimensional array of numbers
{Array} mat2
Two dimensional array of numbers
Returns:
{Array} Two dimensional Array of numbers containing result

<static> {Array} JXG.Math.matrix(n, m, init)
Initializes a matrix as an array of rows with the given value.
Parameters:
{Number} n
Number of rows
{Number} m Optional, Default: n
Number of columns
{Number} init Optional, Default: 0
Initial value for each coefficient
Returns:
{Array} A n times m-matrix represented by a two-dimensional array. The inner arrays hold the columns, the outer array holds the rows.

<static> {Array} JXG.Math.matVecMult(mat, vec)
Multiplies a vector vec to a matrix mat: mat * vec. The matrix is interpreted by this function as an array of rows. Please note: This function does not check if the dimensions match.
var A = [[2, 1],
         [1, 3]],
    b = [4, 5],
    c;
c = JXG.Math.matVecMult(A, b)
// c === [13, 19];
Parameters:
{Array} mat
Two dimensional array of numbers. The inner arrays describe the columns, the outer ones the matrix' rows.
{Array} vec
Array of numbers
Returns:
{Array} Array of numbers containing the result

<static> {Number} JXG.Math.pow(base, exponent)
Compute base to the power of exponent.
Parameters:
{Number} base
{Number} exponent
Returns:
{Number} base to the power of exponent.

<static> {Number} JXG.Math.sinh(x)
Sine hyperbolicus of x.
Parameters:
{Number} x
The number the sine hyperbolicus will be calculated of.
Returns:
{Number} Sine hyperbolicus of the given value.

<static> {Number} JXG.Math.squampow(base, exponent)
A square & multiply algorithm to compute base to the power of exponent. Implementated by Wolfgang Riedl.
Parameters:
{Number} base
{Number} exponent
Returns:
{Number} Base to the power of exponent

<static> {Array} JXG.Math.transpose(M)
Transposes a matrix given as a two dimensional array.
Parameters:
{Array} M
The matrix to be transposed
Returns:
{Array} The transpose of M

<static> {Array} JXG.Math.vector(n, init)
Initializes a vector as an array with the coefficients set to the given value resp. zero.
Parameters:
{Number} n
Length of the vector
{Number} init Optional, Default: 0
Initial value for each coefficient
Returns:
{Array} A n times m-matrix represented by a two-dimensional array. The inner arrays hold the columns, the outer array holds the rows.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 12 2013 19:06:08 GMT-0000 (UTC)