Markus Mottl avatar Markus Mottl committed b8bd914

Merged missing permute code from Olivier

Comments (0)

Files changed (2)

     = "ml_gsl_permute_inverse_barr"
 external permute_inverse_complex : permut -> Gsl_complex.complex_array -> unit
     = "ml_gsl_permute_inverse_complex"
+
+external _mul : permut -> permut -> permut -> unit = "ml_gsl_permute_mul"
+let mul pa pb =
+  let p = create (size pa) in
+  _mul p pa pb ;
+  p
+
+external _lin_to_can : permut -> permut -> unit = "ml_gsl_permute_linear_to_canonical"
+let linear_to_canonical p =
+  let q = create (size p) in
+  _lin_to_can q p ;
+  q
+
+external _can_to_lin : permut -> permut -> unit = "ml_gsl_permute_canonical_to_linear"
+let canonical_to_linear q =
+  let p = create (size q) in
+  _can_to_lin p q ;
+  p
+
+external inversions : permut -> int = "ml_gsl_permute_inversions"
+external canonical_cycles : permut -> int = "ml_gsl_permute_canonical_cycles"
+external linear_cycles : permut -> int = "ml_gsl_permute_linear_cycles"
     = "ml_gsl_permute_inverse_barr"
 external permute_inverse_complex : permut -> Gsl_complex.complex_array -> unit
     = "ml_gsl_permute_inverse_complex"
+
+val mul : permut -> permut -> permut
+
+val linear_to_canonical : permut -> permut
+val canonical_to_linear : permut -> permut
+external inversions : permut -> int = "ml_gsl_permute_inversions"
+external canonical_cycles : permut -> int = "ml_gsl_permute_canonical_cycles"
+external linear_cycles : permut -> int = "ml_gsl_permute_linear_cycles"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.