1 typedef int *lambda_vector
;
2 typedef lambda_vector
*lambda_matrix
;
4 lambda_vector_add_mc (lambda_vector vec1
, int const1
,
5 lambda_vector vec2
, int const2
,
6 lambda_vector vec3
, int size
)
9 for (i
= 0; i
< size
; i
++)
10 vec3
[i
] = const1
* vec1
[i
] + const2
* vec2
[i
];
13 lambda_matrix_add_mc (lambda_matrix mat1
, int const1
,
14 lambda_matrix mat2
, int const2
,
15 lambda_matrix mat3
, int m
, int n
)
18 for (i
= 0; i
< m
; i
++)
19 lambda_vector_add_mc (mat1
[i
], const1
, mat2
[i
], const2
, mat3
[i
], n
);