Macaulay2 Engine
Loading...
Searching...
No Matches
freemodule.h File Reference

Engine-boundary C API for constructing and querying FreeModules. More...

Go to the source code of this file.

Functions

const RingIM2_FreeModule_ring (const FreeModule *F)
int IM2_FreeModule_rank (const FreeModule *F)
M2_string IM2_FreeModule_to_string (const FreeModule *F)
unsigned int rawFreeModuleHash (const FreeModule *F)
const FreeModuleIM2_FreeModule_make (const Ring *R, int rank)
const FreeModuleIM2_FreeModule_make_degs (const Ring *R, M2_arrayint degs)
const FreeModuleIM2_FreeModule_make_schreyer (const Matrix *m)
M2_arrayint IM2_FreeModule_get_degrees (const FreeModule *F)
const MatrixIM2_FreeModule_get_schreyer (const FreeModule *F)
M2_bool IM2_FreeModule_is_equal (const FreeModule *F, const FreeModule *G)
const FreeModuleIM2_FreeModule_sum (const FreeModule *F, const FreeModule *G)
const FreeModuleIM2_FreeModule_tensor (const FreeModule *F, const FreeModule *G)
const FreeModuleIM2_FreeModule_dual (const FreeModule *F)
const FreeModuleIM2_FreeModule_symm (int n, const FreeModule *F)
const FreeModuleIM2_FreeModule_exterior (int n, const FreeModule *F)
const FreeModuleIM2_FreeModule_submodule (const FreeModule *F, M2_arrayint selection)
M2_arrayintOrNull rawFreeModuleSelectByDegrees (const FreeModule *F, M2_arrayint lo, M2_arrayint hi)

Detailed Description

Engine-boundary C API for constructing and querying FreeModules.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares the extern "C" entry points the M2 interpreter calls to build graded free modules over a given Ring and to inspect them once built. Construction comes in plain (IM2_FreeModule_make(R, rank), bound on the M2 side as rawFreeModule) and graded (IM2_FreeModule_make_degs(R, degs), also rawFreeModule) flavours, plus the Schreyer-induced IM2_FreeModule_make_schreyer(m) bound as rawSchreyerSource. The combinators bound as rawDirectSum, rawTensor, rawDual, rawSymmetricPower, rawExteriorPower, and rawSubmodule produce derived free modules from existing ones; the accessors IM2_FreeModule_ring (rawRing), IM2_FreeModule_rank (rawRank), IM2_FreeModule_get_degrees (rawMultiDegree), and IM2_FreeModule_get_schreyer (rawGetSchreyer) expose the underlying state.

FreeModules are immutable once returned, so every "modify" operation builds a fresh object. The in-file BUGS/TODO block notes two outstanding limitations: the Schreyer orders produced by sum / tensor / symm / exterior / submodule currently ignore tie-breaker information, and the engine does not intern free modules per ring (a possible future change). Per-function /* drg: connected ... */ trailers mark the M2-side binding for each C entry point.

See also
freemodule.cpp
engine-includes.hpp

Definition in file freemodule.h.