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

◆ vec_divide_row()

template<typename CoeffRing>
void SMat< CoeffRing >::vec_divide_row ( sparsevec *& v,
size_t r,
const elem & a ) const
private

Definition at line 493 of file smat.hpp.

496{
498 head.next = v;
499 for (sparsevec *p = &head; p->next != 0; p = p->next)
500 if (p->next->row < r)
501 break;
502 else if (p->next->row == r)
503 {
504 ring().divide(p->next->coeff, p->next->coeff, a);
505 if (ring().is_zero(p->next->coeff))
506 {
507 sparsevec *tmp = p->next;
508 p->next = tmp->next;
510 }
511 break;
512 }
513 v = head.next;
514}
const CoeffRing & ring() const
Definition smat.hpp:104
bool is_zero() const
Definition smat.hpp:1107
void vec_remove_node(sparsevec *&v) const
Definition smat.hpp:287
Definition smat.hpp:43

References is_zero(), SMat< ACoeffRing >::sparsevec::next, p, ring(), and vec_remove_node().

Referenced by divide_row().