Base Class Methods
pyrix.matrix.Matrix.__init__()
(Constructor)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- nrow (int): number of rows for the matrix object
- ncol (int): number of columns for the matrix object
- data (nested-list): The data stored in the nested list structure
Returns:
- return : A Matrix Object is returned
Dimensions of the data should match the nrow,ncol values
If this condition is not fulfilled the matrix raises an incompaitableTypeException
pyrix.matrix.Matrix.__repr__()
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : A String is returned
pyrix.matrix.Matrix.__str__()
(str())
Abstract Code Description
1 2 3 4 |
|
details
Every Time print method is called upon the matrix object this method is triggered. This method enables the Module to create a unique object print style.
Returns:
- return : A String is returned
pyrix.matrix.Matrix.__add__()
('+' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : A new Matrix Object is returned
Dimensions of both these matrices should match
If this condition is not fulfilled the matrix raises an incompaitableTypeException
pyrix.matrix.Matrix.__sub__()
('-' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : A new Matrix Object is returned
Dimensions of both these matrices should match
If this condition is not fulfilled the matrix raises an incompaitableTypeException
pyrix.matrix.Matrix.__mul__()
('*' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : A new Matrix Object is returned
The matrix1.nrow
should equal matrix2.ncol
for multiplication operation
If this condition is not fulfilled the matrix raises an incompaitableTypeException
pyrix.matrix.Matrix.__truediv__()
('/' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : An
divisionErrorException
is Raised
pyrix.matrix.Matrix.__floordiv__()
('//' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : An
divisionErrorException
is Raised
pyrix.matrix.Matrix.__pow__()
('**' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- times(int): The power value
Returns:
- return : The same Matrix Object is returned
The matrix should be a square Matrix by nature
If this condition is not fulfilled the matrix raises anincompaitableTypeException
self.isSquareMatrix()
method is accessed to verify the nature
pyrix.matrix.Matrix.__abs__()
(abs())
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : The determinant value is returned (float/int)
The matrix should be a square Matrix by nature
If this condition is not fulfilled the matrix raises anincompaitableTypeException
self.isSquareMatrix()
method is accessed to verify the nature
self.determinantValue()
method is accessed to return the determinant value
pyrix.matrix.Matrix.__mod__()
('%' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : An
divisionErrorException
is Raised
pyrix.matrix.Matrix.__lshift__()
('>>' operator)
Abstract Code Description
1 2 3 4 |
|
Returns:
- return : An
bitWiseOnMatrix
Exception is Raised
pyrix.matrix.Matrix.__rshift__()
('<<' operator)
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : An
bitWiseOnMatrix
Exception is Raised
pyrix.matrix.Matrix.__and__()
('&' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : An
bitWiseOnMatrix
Exception is Raised
pyrix.matrix.Matrix.__or__()
('|' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : An
bitWiseOnMatrix
Exception is Raised
pyrix.matrix.Matrix.__xor__()
('^' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : An
bitWiseOnMatrix
Exception is Raised
pyrix.matrix.Matrix.__invert__()
('~' operator)
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : An
bitWiseOnMatrix
Exception is Raised
pyrix.matrix.Matrix.__eq__()
('==' operator)
Abstract Code Description
1 2 3 4 |
|
details
parameters:
- matrix2 (Matrix Object): the second operand matrix
Returns:
- return : A Boolean Value is returned based on the equality of indivisual values
pyrix.matrix.Matrix.__trunc__()
(trunc()
)
Description
The trunc function behaves as a ceiling function for negative number and floor function for positive number.
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : Returns a Matrix Object with Truncated Values.
pyrix.matrix.Matrix.__floor__()
(floor()
)
Description
The floor function floors the value for a float numbers in the matrix.
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : Returns a Matrix Object with Floored Values.
pyrix.matrix.Matrix.__ceil__()
(ceil()
)
Description
The ceil function ceils the value for a float numbers in the matrix.
Abstract Code Description
1 2 3 4 |
|
details
Returns:
- return : Returns a Matrix Object with Ceil limited Values.