diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/common/matrix.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/common/matrix.h b/include/common/matrix.h index 6c35cc0..726a8ab 100644 --- a/include/common/matrix.h +++ b/include/common/matrix.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | /** | 4 | /** |
5 | * File: matrix.h | 5 | * File: matrix.h |
6 | * Matrices representation and useful operations. | ||
6 | * | 7 | * |
7 | * See also: | 8 | * See also: |
8 | * The film | 9 | * The film |
@@ -15,7 +16,7 @@ | |||
15 | * Represents a square integer matrix. | 16 | * Represents a square integer matrix. |
16 | */ | 17 | */ |
17 | typedef struct { | 18 | typedef struct { |
18 | IntVector *elements; | 19 | IntVector **elements; |
19 | IntVector dim; | 20 | IntVector dim; |
20 | } IntSquareMatrix; | 21 | } IntSquareMatrix; |
21 | 22 | ||
@@ -31,4 +32,16 @@ typedef struct { | |||
31 | */ | 32 | */ |
32 | IntVector matrix_int_det(IntSquareMatrix *matrix); | 33 | IntVector matrix_int_det(IntSquareMatrix *matrix); |
33 | 34 | ||
35 | /** | ||
36 | * Function: matrix_reshape | ||
37 | * Reshapes a flat vector into a bi-dimensional row pointer array. | ||
38 | * | ||
39 | * Parameters: | ||
40 | * **bi_dim - pointer to the result row array | ||
41 | * *flat - flat vector | ||
42 | * width - number of elements per row | ||
43 | * height - number of rows | ||
44 | */ | ||
45 | void matrix_reshape(IntVector **bi_dim, IntVector *flat, int width, int height); | ||
46 | |||
34 | #endif | 47 | #endif |