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

Engine-boundary C API for the Numerical Algebraic Geometry subsystem. More...

Go to the source code of this file.

Functions

M2HomotopyrawHomotopy (M2SLEvaluator *Hx, M2SLEvaluator *Hxt, M2SLEvaluator *HxH)
M2SLEvaluatorrawSLEvaluator (M2SLProgram *SLP, M2_arrayint constsPos, M2_arrayint varsPos, const MutableMatrix *consts)
M2SLEvaluatorrawCompiledSLEvaluator (M2_string libName, int nInputs, int nOutputs, const MutableMatrix *empty)
M2SLEvaluatorrawSLEvaluatorSpecialize (M2SLEvaluator *H, const MutableMatrix *parameters)
M2SLProgramrawSLProgram (unsigned long nConstantsAndInputs)
M2_string rawSLEvaluatorToString (M2SLEvaluator *)
M2_bool rawSLEvaluatorEvaluate (M2SLEvaluator *sle, const MutableMatrix *inputs, MutableMatrix *outputs)
M2_string rawHomotopyToString (M2Homotopy *)
M2_string rawSLProgramToString (M2SLProgram *)
unsigned int rawSLEvaluatorHash (M2SLEvaluator *)
unsigned int rawHomotopyHash (M2Homotopy *)
unsigned int rawSLProgramHash (M2SLProgram *)
M2_bool rawHomotopyTrack (M2Homotopy *H, const MutableMatrix *inputs, MutableMatrix *outputs, MutableMatrix *output_extras, gmp_RR init_dt, gmp_RR min_dt, gmp_RR epsilon, int max_corr_steps, gmp_RR infinity_threshold, M2_bool checkPrecision)
gmp_ZZ rawSLPInputGate (M2SLProgram *S)
gmp_ZZ rawSLPSumGate (M2SLProgram *S, M2_arrayint a)
gmp_ZZ rawSLPProductGate (M2SLProgram *S, M2_arrayint a)
gmp_ZZ rawSLPDetGate (M2SLProgram *S, M2_arrayint a)
gmp_ZZ rawSLPsetOutputPositions (M2SLProgram *S, M2_arrayint a)
gmp_ZZ rawSLPDivideGate (M2SLProgram *S, M2_arrayint a)
StraightLineProgramrawSLP (const Matrix *consts, M2_arrayint program)
const MatrixrawEvaluateSLP (StraightLineProgram *SLP, const Matrix *vals)
M2_string rawStraightLineProgramToString (StraightLineProgram *)
unsigned int rawStraightLineProgramHash (StraightLineProgram *)
const MatrixrawTrackPaths (StraightLineProgram *slp_pred, StraightLineProgram *slp_corr, const Matrix *start_sols, M2_bool is_projective, gmp_RR init_dt, gmp_RR min_dt, gmp_RR max_dt, gmp_RR dt_increase_factor, gmp_RR dt_decrease_factor, int num_successes_before_increase, gmp_RR epsilon, int max_corr_steps, int pred_type)
PathTrackerrawPathTrackerPrecookedSLPs (StraightLineProgram *slp_pred, StraightLineProgram *slp_corr)
 PathTracker /////////////////////////////////////////////////////.
PathTrackerrawPathTracker (const Matrix *)
PathTrackerrawPathTrackerProjective (const Matrix *, const Matrix *, gmp_RR)
M2_string rawPathTrackerToString (PathTracker *)
unsigned int rawPathTrackerHash (PathTracker *)
void rawSetParametersPT (PathTracker *PT, M2_bool is_projective, gmp_RR init_dt, gmp_RR min_dt, gmp_RR dt_increase_factor, gmp_RR dt_decrease_factor, int num_successes_before_increase, gmp_RR epsilon, int max_corr_steps, gmp_RR end_zone_factor, gmp_RR infinity_threshold, int pred_type)
void rawLaunchPT (PathTracker *PT, const Matrix *start_sols)
const MatrixrawGetSolutionPT (PathTracker *PT, int solN)
const MatrixrawGetAllSolutionsPT (PathTracker *PT)
int rawGetSolutionStatusPT (PathTracker *PT, int solN)
int rawGetSolutionStepsPT (PathTracker *PT, int solN)
gmp_RRorNull rawGetSolutionLastTvaluePT (PathTracker *PT, int solN)
gmp_RRorNull rawGetSolutionRcondPT (PathTracker *PT, int solN)
const MatrixrawRefinePT (PathTracker *PT, const Matrix *sols, gmp_RR tolerance, int max_corr_steps_refine)
unsigned int rawPointArrayHash (M2PointArray *)
M2_string rawPointArrayToString (M2PointArray *)
M2PointArrayrawPointArray (double epsilon, int n)
int rawPointArrayLookup (M2PointArray *pa, const MutableMatrix *M, int col)
int rawPointArrayLookupOrAppend (M2PointArray *pa, const MutableMatrix *M, int col)

Detailed Description

Engine-boundary C API for the Numerical Algebraic Geometry subsystem.

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

Declares the extern "C" entry points that the M2 interpreter (via NumericalAlgebraicGeometry, MonodromySolver, and related packages) uses to drive homotopy continuation, witness- set construction, and SLP-based polynomial evaluation. Six opaque handle types (M2SLProgram, M2SLEvaluator, StraightLineProgram, M2Homotopy, PathTracker, M2PointArray) hide the C++ classes behind C-callable structs so the front end can pass them around without seeing their layout; the same names resolve to the real classes when compiled as C++.

The functions cover the full NAG workflow — rawSLProgram / rawSLP build a straight-line program, rawSLEvaluator and rawCompiledSLEvaluator wrap it for evaluation, rawHomotopy / rawHomotopyTrack run continuation, rawPathTracker* does explicit step-size-controlled tracking, and rawPointArray* manages collections of numerical solutions. Each handle also has a *Hash / *ToString pair the interpreter uses for printing and equality.

See also
NAG.cpp
SLP.hpp
engine-includes.hpp

Definition in file NAG.h.