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

◆ rawLinAlgCharPoly()

Definition at line 1006 of file mutable-matrix.cpp.

1009{
1010 (void) A;
1011#if 1
1012#if 0
1013 const Ring *R = A->get_ring();
1016 if (B == 0)
1017 {
1018 ERROR("expected a dense mutable matrix over the ffpack finite field");
1019 return 0;
1020 }
1021 M2::ARingZZpFFPACK::ElementType *elemsA = B->get_Mat()->array();
1022 std::vector<M2::ARingZZpFFPACK::ElementType> charpoly;
1023
1024 // CharPoly isn't there any more (?)
1025 FFPACK::CharPoly(B->get_Mat()->ring().field(), charpoly, A->n_rows(),
1026 elemsA, A->n_rows());
1027
1028 for (size_t i = 0; i < charpoly.size(); i++) std::cout << charpoly[i] << " ";
1029 std::cout << std::endl;
1030 return convertRingelemsToArray(R, charpoly);
1031#else
1032 return nullptr;
1033#endif
1034#else
1035 ERROR("not implemented: configure M2 with --enable-ffpack-fflas");
1036 return 0;
1037#endif
1038}
Definition dmat.hpp:62
FieldType::Element ElementType
virtual size_t n_rows() const =0
MutableMat< MatType > * cast_to_MutableMat()
Definition mat.hpp:139
virtual const Ring * get_ring() const =0
xxx xxx xxx
Definition ring.hpp:102
DMat< M2::ARingZZp > DMatZZp
const int ERROR
Definition m2-mem.cpp:55
engine_RawRingElementArray convertRingelemsToArray(const Ring *R, std::vector< M2::ARingZZpFFPACK::ElementType > &elems)

References MutableMatrix::cast_to_MutableMat(), convertRingelemsToArray(), ERROR, MutableMat< Mat >::get_Mat(), MutableMatrix::get_ring(), and MutableMatrix::n_rows().