File: test_alignment.c

package info (click to toggle)
libm4ri 20200125-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,560 kB
  • sloc: ansic: 12,633; sh: 4,304; makefile: 137
file content (31 lines) | stat: -rw-r--r-- 528 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include "m4ri/m4ri.h"

int main(int argc, char const *argv[]) {
  int rows    = 16;
  int columns = 229;
  mzd_t *A    = mzd_init(rows, columns);

  mzd_t *B = mzd_init(rows, columns);
  mzd_t *C;

  mzd_randomize(A);

  mzd_copy(B, A);
  mzd_echelonize(B, 1);

  mzd_copy(B, A);
  C = mzd_init_window(B, 0, 128, 16, 229);
  mzd_echelonize(C, 1);
  mzd_free(C);

  mzd_copy(B, A);
  C = mzd_init_window(B, 0, 64, 16, 229);
  mzd_echelonize(C, 1);
  mzd_free(C);

  mzd_free(B);
  mzd_free(A);

  return 0;
}