Definition at line 550 of file ring-vecs.cpp.
551{
552 if (w == nullptr) return;
553 if (v == nullptr)
554 {
555 v = w;
556 w = nullptr;
557 return;
558 }
559 vecterm head;
561 while (true)
562 if (v->comp < w->comp)
563 {
566 w = w->next;
567 if (w == nullptr)
568 {
571 return;
572 }
573 }
574 else if (v->comp > w->comp)
575 {
578 v = v->next;
579 if (v == nullptr)
580 {
583 w = nullptr;
584 return;
585 }
586 }
587 else
588 {
589 vec tmv = v;
590 vec tmw = w;
591 v = v->next;
592 w = w->next;
593 tmv->coeff = this->
add(tmv->coeff, tmw->coeff);
595 {
597 }
598 else
599 {
602 }
604 if (w == nullptr)
605 {
608 return;
609 }
610 if (v == nullptr)
611 {
614 w = nullptr;
615 return;
616 }
617 }
618}
void remove_vec_node(vec n) const
virtual ring_elem add(const ring_elem f, const ring_elem g) const =0
virtual bool is_zero(const ring_elem f) const =0
VALGRIND_MAKE_MEM_DEFINED & result(result)
References add(), is_zero(), vec::next, remove_vec_node(), and result().
Referenced by add_vec(), mult_vec_matrix(), subtract_vec(), subtract_vec_to(), F4toM2Interface::to_M2_vec(), ResF4toM2Interface::to_M2_vec(), and vec_sort().