Definition at line 124 of file sparsmat.cc.
◆ sparse_mat()
sparse_mat::sparse_mat |
( |
ideal |
smat, |
|
|
const ring |
RR |
|
) |
| |
Definition at line 386 of file sparsmat.cc.
387{
389 poly* pmat;
391
395 {
397 return;
398 }
415 pmat = smat->m;
417 {
420 }
423}
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
static smpoly sm_Poly2Smpoly(poly, const ring)
◆ ~sparse_mat()
sparse_mat::~sparse_mat |
( |
| ) |
|
Definition at line 428 of file sparsmat.cc.
429{
442}
#define omFreeSize(addr, size)
#define omFreeBin(addr, bin)
◆ sm1Elim()
void sparse_mat::sm1Elim |
( |
| ) |
|
|
private |
Definition at line 799 of file sparsmat.cc.
800{
806
808 {
810 return;
811 }
812 do
813 {
820 {
822 {
823 do
824 {
831 break;
832 }
834 {
836 a = a->n;
837 }
838 else if (a->pos >
b->pos)
839 {
845 }
846 else
847 {
853 {
854 a->m = ha;
855 a->e = 1;
858 a = a->n;
859 }
860 else
861 {
863 }
865 }
867 {
869 break;
870 }
871 }
875}
static poly p_Add_q(poly p, poly q, const ring r)
static void p_Delete(poly *p, const ring r)
static poly pp_Mult_qq(poly p, poly q, const ring r)
static void sm_ElemDelete(smpoly *, const ring)
static float sm_PolyWeight(smpoly, const ring)
static smpoly smElemCopy(smpoly)
◆ smActDel()
void sparse_mat::smActDel |
( |
| ) |
|
|
private |
Definition at line 1475 of file sparsmat.cc.
1476{
1479
1481 {
1483 do
1484 {
1486 }
while (a !=
NULL);
1487 }
1488}
◆ smCheckNormalize()
int sparse_mat::smCheckNormalize |
( |
| ) |
|
|
private |
Definition at line 1413 of file sparsmat.cc.
1414{
1417
1419 {
1421 do
1422 {
1424 a = a->n;
1425 }
while (a !=
NULL);
1426 }
1427 return 0;
1428}
static BOOLEAN sm_HaveDenom(poly, const ring)
◆ smColDel()
void sparse_mat::smColDel |
( |
| ) |
|
|
private |
Definition at line 1493 of file sparsmat.cc.
1494{
1496
1498 {
1500 }
1501}
◆ smColToRow()
void sparse_mat::smColToRow |
( |
| ) |
|
|
private |
Definition at line 1081 of file sparsmat.cc.
1082{
1085
1087 {
1089 c = c->n;
1093 }
1094}
◆ smCopToRes()
void sparse_mat::smCopToRes |
( |
| ) |
|
|
private |
Definition at line 1203 of file sparsmat.cc.
1204{
1207
1210 {
1212 do
1213 {
1216 a = a->n;
1217 }
while ((a !=
NULL) && (a->pos <=
tored));
1219 {
1223 {
1225 {
1227 {
1231 }
1232 a = a->n;
1233 if ((a ==
NULL) || (a->pos >
tored))
break;
1234 }
1236 if ((
k >
i) && (a->pos <=
tored))
1237 {
1238 do
1239 {
1242 a = a->n;
1243 }
while ((a !=
NULL) && (a->pos <=
tored));
1244 break;
1245 }
1246 }
1247 }
1248 }
1250 {
1253 while ((a !=
NULL) && (a->pos <=
tored))
1254 {
1256 {
1258 a = a->n;
1259 }
1261 }
1262 }
1265 {
1268 {
1271 do
1272 {
1275 {
1278 {
1280 r = r->n;
1283 break;
1284 }
1286 }
1288 }
1289 }
1291 {
1295 }
1297 {
1299 {
1304 do
1305 {
1308 {
1311 {
1313 r = r->n;
1316 break;
1317 }
1319 }
1321 }
1322 }
1324 {
1326 {
1329 do
1330 {
1333 {
1336 {
1338 r = r->n;
1341 break;
1342 }
1344 }
1346 }
1347 }
1349 {
1353 }
1354}
◆ smDet()
poly sparse_mat::smDet |
( |
| ) |
|
Definition at line 475 of file sparsmat.cc.
476{
478
480 {
483 }
485 {
489 }
502 {
505 }
507 {
513 }
515 {
527 {
531 }
533 {
540 }
541 }
542}
void PrintS(const char *s)
◆ smFinalMult()
void sparse_mat::smFinalMult |
( |
| ) |
|
|
private |
Definition at line 1384 of file sparsmat.cc.
1385{
1387 poly ha;
1390
1392 {
1394 do
1395 {
1398 {
1402 a->m = ha;
1403 }
1405 a = a->n;
1406 }
while (a !=
NULL);
1407 }
1408}
void p_Normalize(poly p, const ring r)
◆ smGetAct()
smpoly * sparse_mat::smGetAct |
( |
| ) |
|
|
inline |
◆ smGetRed()
int sparse_mat::smGetRed |
( |
| ) |
|
|
inline |
◆ smGetSign()
int sparse_mat::smGetSign |
( |
| ) |
|
|
inline |
◆ smHElim()
void sparse_mat::smHElim |
( |
| ) |
|
|
private |
Definition at line 878 of file sparsmat.cc.
879{
886 int e, ip, ir, ia;
887
889 {
892 return;
893 }
896 do
897 {
902 hr = r->m;
903 ir = r->e;
905 {
907 {
908 do
909 {
918 break;
919 }
921 {
923 a = a->n;
924 }
925 else if (a->pos >
b->pos)
926 {
934 }
935 else
936 {
937 ha = a->m;
938 ia = a->e;
939 if (ir >= ia)
940 {
941 if (ir > ia)
942 {
947 ia = ir;
948 }
952 }
953 else if (ir >= ip)
954 {
956 {
961 }
963 if(ir > ip)
964 {
967 }
968 ia = ir;
973 }
974 else
975 {
982 }
985 {
987 a->m = ha;
988 a->e = e;
991 a = a->n;
992 }
993 else
994 {
997 }
999 }
1001 {
1003 break;
1004 }
1005 }
1008 }
while (r !=
NULL);
1010}
const CanonicalForm int const CFList const Variable & y
◆ smInitPerm()
void sparse_mat::smInitPerm |
( |
| ) |
|
|
private |
◆ smMultCol()
void sparse_mat::smMultCol |
( |
| ) |
|
|
private |
Definition at line 1359 of file sparsmat.cc.
1360{
1363 poly ha;
1365
1367 {
1370 {
1374 a->m = ha;
1376 }
1377 a = a->n;
1378 }
1379}
◆ smMultPoly()
poly sparse_mat::smMultPoly |
( |
smpoly |
a | ) |
|
|
private |
Definition at line 1453 of file sparsmat.cc.
1454{
1457
1459 {
1466 return r;
1467 }
1468 else
1470}
◆ smNewBareiss()
void sparse_mat::smNewBareiss |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Definition at line 549 of file sparsmat.cc.
550{
552 {
555 }
558 {
560 return;
561 }
575 {
578 return;
579 }
581 {
595 {
599 return;
600 }
601 }
602}
◆ smNewPivot()
void sparse_mat::smNewPivot |
( |
| ) |
|
|
private |
Definition at line 737 of file sparsmat.cc.
738{
739 float wopt = 1.0e30, hp =
piv->f;
742 int i, copt, ropt,
f, e =
crd;
743
746 {
749 {
751 break;
755 {
758 }
761 if ((wr<0.25) || (wc<0.25))
762 {
764 {
767 ropt = a->pos;
768 }
769 }
770 else
771 {
773 wp += wr*wc;
774 if (wp < wopt)
775 {
776 wopt = wp;
778 ropt = a->pos;
779 }
780 }
781 a = a->n;
783 break;
784 }
785 }
789 {
793 }
794}
◆ smNewWeights()
void sparse_mat::smNewWeights |
( |
| ) |
|
|
private |
Definition at line 699 of file sparsmat.cc.
700{
701 float wc, wp,
w, hp =
piv->f;
704
705 wp = 0.0;
708 {
709 wc = 0.0;
712 {
714 break;
718 {
721 }
724 a = a->n;
726 break;
727 }
728 wp += wc;
730 }
732}
◆ smNormalize()
void sparse_mat::smNormalize |
( |
| ) |
|
|
private |
Definition at line 1433 of file sparsmat.cc.
1434{
1438
1440 {
1442 do
1443 {
1445 a = a->n;
1446 }
while (a !=
NULL);
1447 }
1448}
◆ smPivDel()
void sparse_mat::smPivDel |
( |
| ) |
|
|
private |
Definition at line 1506 of file sparsmat.cc.
1507{
1509
1511 {
1514 }
1515}
◆ smPivot()
void sparse_mat::smPivot |
( |
| ) |
|
|
private |
Definition at line 642 of file sparsmat.cc.
643{
644 float wopt = 1.0e30;
648
651 {
654 {
656 break;
660 if ((wr<0.25) || (wc<0.25))
661 {
663 {
666 ropt = a->pos;
667 }
668 }
669 else
670 {
672 wp += wr*wc;
673 if (wp < wopt)
674 {
675 wopt = wp;
677 ropt = a->pos;
678 }
679 }
680 a = a->n;
682 break;
683 }
684 }
688 {
692 }
693}
◆ smRes2Mod()
ideal sparse_mat::smRes2Mod |
( |
| ) |
|
Definition at line 448 of file sparsmat.cc.
449{
452
454 {
457 }
459}
static int si_max(const int a, const int b)
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static poly sm_Smpoly2Poly(smpoly, const ring)
◆ smRowToCol()
void sparse_mat::smRowToCol |
( |
| ) |
|
|
private |
Definition at line 1101 of file sparsmat.cc.
1102{
1105
1111 {
1114 {
1117 {
1119 r = r->n;
1122 break;
1123 }
1125 }
1126 }
1127}
◆ smSelectPR()
void sparse_mat::smSelectPR |
( |
| ) |
|
|
private |
Definition at line 1017 of file sparsmat.cc.
1018{
1022
1024 {
1027 else
1029 }
1032 {
1033 do
1034 {
1036 a = a->n;
1037 }
while (a->pos <
rpiv);
1039 }
1040 else
1045 {
1048 {
1050 {
1052 a = a->n;
1053 if ((a ==
NULL) || (a->pos >
rpiv))
1054 break;
1056 {
1061 break;
1062 }
1063 }
1064 }
1065 else if (a->pos ==
rpiv)
1066 {
1071 }
1072 }
1075}
static poly p_Neg(poly p, const ring r)
◆ smSign()
void sparse_mat::smSign |
( |
| ) |
|
|
private |
Definition at line 1520 of file sparsmat.cc.
1521{
1524 {
1530 {
1534 }
1536 {
1539 }
1540 }
1541 else
1542 {
1545 }
1546}
◆ smSparseHomog()
void sparse_mat::smSparseHomog |
( |
| ) |
|
|
private |
◆ smToIntvec()
void sparse_mat::smToIntvec |
( |
intvec * |
v | ) |
|
Definition at line 464 of file sparsmat.cc.
465{
467
468 for (
i=
v->rows()-1;
i>=0;
i--)
470}
const Variable & v
< [in] a sqrfree bivariate poly
◆ smToredElim()
void sparse_mat::smToredElim |
( |
| ) |
|
|
private |
Definition at line 1164 of file sparsmat.cc.
1165{
1168
1170 {
1172 if (
i >
act)
return;
1174 {
1177 break;
1178 }
1179 }
1182 {
1186 {
1189 }
1190 else
1191 {
1194 }
1195 }
1198}
◆ smWeights()
void sparse_mat::smWeights |
( |
| ) |
|
|
private |
Definition at line 610 of file sparsmat.cc.
611{
615
616 wp = 0.0;
619 {
620 wc = 0.0;
623 {
625 break;
629 a = a->n;
631 break;
632 }
633 wp += wc;
635 }
637}
◆ smZeroElim()
void sparse_mat::smZeroElim |
( |
| ) |
|
|
private |
Definition at line 1134 of file sparsmat.cc.
1135{
1138
1140 {
1142 if (
i >
act)
return;
1144 }
1147 {
1151 {
1154 }
1155 }
1158}
◆ _R
◆ act
◆ cpiv
◆ crd
◆ dumm
◆ inred
◆ m_act
◆ m_res
◆ m_row
◆ ncols
◆ normalize
int sparse_mat::normalize |
|
private |
◆ nrows
◆ oldpiv
◆ perm
◆ piv
◆ red
◆ rpiv
◆ sign
◆ tored
◆ wcl
◆ wpoints
float sparse_mat::wpoints |
|
private |
◆ wrw
The documentation for this class was generated from the following file: