Macaulay2 Engine
Loading...
Searching...
No Matches

◆ convert_to_absolute_position()

template<class Field>
void SLP< Field >::convert_to_absolute_position ( )
private

Definition at line 914 of file NAG.cpp.

915{
917 is_relative_position = false;
918 else
919 return;
920
922 int* a = program->array;
923 for (int i = SLP_HEADER_LEN; a[i] != slpEND; cur_node++)
924 {
925 switch (a[i])
926 {
927 case slpCOPY:
929 break;
930 case slpMULTIsum:
931 {
932 int n_summands = a[(++i)++];
933 for (int j = 0; j < n_summands; j++)
935 }
936 break;
937 case slpPRODUCT:
940 break;
941 default:
942 ERROR("unknown SLP operation");
943 printf("i = %d, a[i] = %d\n", i, a[i]);
944 return;
945 }
946 }
947}
void relative_to_absolute(int &aa, int cur_node)
Definition NAG.hpp:528
M2_arrayint program
Definition NAG.hpp:498
int num_inputs
Definition NAG.hpp:502
int num_consts
Definition NAG.hpp:502
bool is_relative_position
Definition NAG.hpp:497
Definition NAG.hpp:485
const int ERROR
Definition m2-mem.cpp:55

References ERROR, is_relative_position, num_consts, num_inputs, program, relative_to_absolute(), SLP_HEADER_LEN, slpCOPY, slpEND, slpMULTIsum, and slpPRODUCT.

Referenced by evaluate(), and evaluate().