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

Function basis_elt

Singular/dyn_modules/Order/nforder.cpp:422–437  ·  view source on GitHub ↗

________________1_______________ */

Source from the content-addressed store, hash-verified

420
421/*________________1_______________ */
422void basis_elt(bigintmat *m, int i) {
423 if (((m->rows() == 1) && (i <= m->cols())) || ((m->cols() == 1) && (i <= m->rows()))) {
424 // Falls m Zeilen- oder Spaltenvektor ist, setze alle Einträge auf 0 und Eintrag i auf 1 (Koeff-Vektor des i-ten Basiselements)
425 number t1 = n_Init(0,m->basecoeffs());
426 for (int j=0; ((j<m->rows()) || (j<m->cols())); j++) {
427 m->set(j, t1);
428
429 }
430 n_Delete(&t1,m->basecoeffs());
431 number t2 = n_Init(1,m->basecoeffs());
432 m->set(i-1, t2);
433 n_Delete(&t2,m->basecoeffs());
434 }
435 else
436 Werror("Error in basis_elt. Not a vector.");
437}
438
439////////////////////////////////////
440//////////// 2 Round 2 /////////////

Callers 5

EltInitFunction · 0.85
traceMatrixMethod · 0.85
multmapMethod · 0.85
radicalmodpbaseFunction · 0.85
createmulttableMethod · 0.85

Calls 7

n_InitFunction · 0.85
n_DeleteFunction · 0.85
WerrorFunction · 0.85
rowsMethod · 0.80
colsMethod · 0.80
basecoeffsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected