Definition at line 547 of file matrix.cpp.
548{
549 const Ring *R = F->get_ring();
550 if (R !=
G->get_ring())
551 {
552 ERROR(
"flip: expected same ring");
553 return nullptr;
554 }
557
559 int next = 0;
560 for (int f = 0; f < F->rank(); f++)
561 for (
int g = 0; g <
G->rank(); g++)
562 mat.set_column(next++, R->
e_sub_i(f + g * F->rank()));
563 return mat.to_matrix();
564}
FreeModule * tensor(const FreeModule *G) const
friend class MatrixConstructor
References Ring::e_sub_i(), ERROR, flip(), FreeModule, G, FreeModule::get_ring(), Matrix(), MatrixConstructor, FreeModule::rank(), MatrixConstructor::set_column(), FreeModule::tensor(), and MatrixConstructor::to_matrix().
Referenced by flip().