MCPcopy Create free account
hub / github.com/Singular/Singular / MoveNext

Method MoveNext

libpolys/polys/PolyEnumerator.h:81–107  ·  view source on GitHub ↗

Advances the position to the next term of the polynomial. returns true if the position marker was successfully advanced to the next term which can be used; false if the position marker has passed the end of the polynomial.

Source from the content-addressed store, hash-verified

79 /// false if the position marker has passed the end of the
80 /// polynomial.
81 virtual bool MoveNext()
82 {
83 assume( m_position != NULL );
84
85 {
86 const poly p_next = pNext(m_position);
87
88 if (p_next != NULL) // not the last term?
89 {
90 m_position = p_next;
91 assume( IsValid() );
92 return true;
93 }
94 }
95
96 if (m_position == &m_prevposition_struct) // -1 position?
97 {
98 assume( !IsValid() );
99 m_position = m_poly;
100 return (m_position != NULL);
101 }
102
103 // else: past the end (or an empty polynomial)
104 m_position = NULL;
105 assume( !IsValid() );
106 return false;
107 }
108};
109
110

Callers 7

ndClearContentFunction · 0.45
nlClearContentFunction · 0.45
nlClearDenominatorsFunction · 0.45
MoveNextMethod · 0.45
naClearContentFunction · 0.45
ntClearContentFunction · 0.45
ntClearDenominatorsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected