@@ -10,56 +10,56 @@ This module contains classes and functions for doing linear algebra.
10
10
-
11
11
- This class represents a vector of arbitrary size and related operations.
12
12
13
- **Overview about the methods:**
13
+ **Overview of the methods:**
14
14
15
- - constructor(components : list ) : init the vector
16
- - set(components : list ) : changes the vector components.
15
+ - constructor(components) : init the vector
16
+ - set(components) : changes the vector components.
17
17
- \_\_str\_\_() : toString method
18
- - component(i : int ): gets the i-th component (start by 0 )
18
+ - component(i): gets the i-th component (0-indexed )
19
19
- \_\_len\_\_() : gets the size / length of the vector (number of components)
20
- - euclidLength () : returns the eulidean length of the vector.
20
+ - euclidean_length () : returns the eulidean length of the vector
21
21
- operator + : vector addition
22
22
- operator - : vector subtraction
23
23
- operator * : scalar multiplication and dot product
24
- - copy() : copies this vector and returns it.
25
- - changeComponent (pos,value) : changes the specified component.
24
+ - copy() : copies this vector and returns it
25
+ - change_component (pos,value) : changes the specified component
26
26
27
- - function zeroVector (dimension)
27
+ - function zero_vector (dimension)
28
28
- returns a zero vector of 'dimension'
29
- - function unitBasisVector (dimension,pos)
30
- - returns a unit basis vector with a One at index 'pos' (indexing at 0 )
31
- - function axpy(scalar,vector1,vector2)
29
+ - function unit_basis_vector (dimension, pos)
30
+ - returns a unit basis vector with a one at index 'pos' (0-indexed )
31
+ - function axpy(scalar, vector1, vector2)
32
32
- computes the axpy operation
33
- - function randomVector (N,a, b)
34
- - returns a random vector of size N, with random integer components between 'a' and 'b'.
33
+ - function random_vector (N, a, b)
34
+ - returns a random vector of size N, with random integer components between 'a' and 'b' inclusive
35
35
36
36
### class Matrix
37
37
-
38
38
- This class represents a matrix of arbitrary size and operations on it.
39
39
40
- **Overview about the methods:**
40
+ **Overview of the methods:**
41
41
42
42
- \_\_str\_\_() : returns a string representation
43
43
- operator * : implements the matrix vector multiplication
44
44
implements the matrix-scalar multiplication.
45
- - changeComponent (x,y, value) : changes the specified component.
46
- - component(x,y) : returns the specified component.
45
+ - change_component (x, y, value) : changes the specified component.
46
+ - component(x, y) : returns the specified component.
47
47
- width() : returns the width of the matrix
48
48
- height() : returns the height of the matrix
49
- - determinate () : returns the determinate of the matrix if it is square
49
+ - determinant () : returns the determinant of the matrix if it is square
50
50
- operator + : implements the matrix-addition.
51
- - operator - _ implements the matrix-subtraction
51
+ - operator - : implements the matrix-subtraction
52
52
53
- - function squareZeroMatrix (N)
53
+ - function square_zero_matrix (N)
54
54
- returns a square zero-matrix of dimension NxN
55
- - function randomMatrix (W,H,a, b)
56
- - returns a random matrix WxH with integer components between 'a' and 'b'
55
+ - function random_matrix (W, H, a, b)
56
+ - returns a random matrix WxH with integer components between 'a' and 'b' inclusive
57
57
---
58
58
59
59
## Documentation
60
60
61
61
This module uses docstrings to enable the use of Python's in-built ` help(...) ` function.
62
- For instance, try ` help(Vector) ` , ` help(unitBasisVector ) ` , and ` help(CLASSNAME.METHODNAME) ` .
62
+ For instance, try ` help(Vector) ` , ` help(unit_basis_vector ) ` , and ` help(CLASSNAME.METHODNAME) ` .
63
63
64
64
---
65
65
0 commit comments