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

◆ vec_scale_row()

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

Definition at line 437 of file smat.hpp.

440{
442 head.next = v;
443 for (sparsevec *p = &head; p->next != 0; p = p->next)
444 if (p->next->row < r)
445 break;
446 else if (p->next->row == r)
447 {
448 ring().mult(p->next->coeff, a, p->next->coeff);
449 if (ring().is_zero(p->next->coeff))
450 {
451 sparsevec *tmp = p->next;
452 p->next = tmp->next;
454 }
455 break;
456 }
457 v = head.next;
458}
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 scale_row().