Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TP_Programmation_Sequentielle
matrix
Commits
6c56cef9
Commit
6c56cef9
authored
5 months ago
by
thibaud
Browse files
Options
Downloads
Patches
Plain Diff
écriture des fonctions matricielles terminées
parent
aad4daca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matrix.h
+28
-0
28 additions, 0 deletions
matrix.h
with
28 additions
and
0 deletions
matrix.h
+
28
−
0
View file @
6c56cef9
#ifndef _MY_MATRIX_
#define _MY_MATRIX_
#include
<cstdint>
#include
<stdbool.h>
typedef
enum
_error_code
{
OK
,
ERR
}
error_code
;
struct
_matrix
{
int32_t
m
,
n
;
int32_t
**
data
;
}
matrix
;
error_code
matrix_alloc
(
_matrix
*
mat
,
int32_t
m
,
int32_t
n
);
error_code
matrix_init
(
_matrix
*
mat
,
int32_t
m
,
int32_t
n
,
int32_t
val
);
error_code
matrix_destroy
(
_matrix
*
mat
);
error_code
matrix_init_from_array
(
_matrix
*
mat
,
int32_t
m
,
int32_t
n
,
int32_t
data
[],
int32_t
s
);
error_code
matrix_clone
(
_matrix
*
cloned
,
_matrix
mat
);
error_code
matrix_transpose
(
_matrix
*
transposed
,
_matrix
mat
);
error_code
matrix_print
(
_matrix
mat
);
bool
matrix_is_equal
(
_matrix
mat1
,
_matrix
mat2
);
error_code
matrix_get
(
int32_t
*
elem
,
_matrix
mat
,
int32_t
ix
,
int32_t
iy
);
error_code
matrix_set
(
_matrix
mat
,
int32_t
ix
,
int32_t
iy
,
int32_t
elem
);
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment