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

Method mapFromMatrix

kernel/numeric/mpr_numeric.cc:1011–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1009}
1010
1011BOOLEAN simplex::mapFromMatrix( matrix mm )
1012{
1013 int i,j;
1014// if ( MATROWS( m ) > LiPM_rows || MATCOLS( m ) > LiPM_cols ) {
1015// WarnS("");
1016// return FALSE;
1017// }
1018
1019 number coef;
1020 for ( i= 1; i <= MATROWS( mm ); i++ )
1021 {
1022 for ( j= 1; j <= MATCOLS( mm ); j++ )
1023 {
1024 if ( MATELEM(mm,i,j) != NULL )
1025 {
1026 coef= pGetCoeff( MATELEM(mm,i,j) );
1027 if ( coef != NULL && !nIsZero(coef) )
1028 LiPM[i][j]= (double)(*(gmp_float*)coef);
1029 //#ifdef mpr_DEBUG_PROT
1030 //Print("%f ",LiPM[i][j]);
1031 //#endif
1032 }
1033 }
1034 // PrintLn();
1035 }
1036
1037 return TRUE;
1038}
1039
1040matrix simplex::mapToMatrix( matrix mm )
1041{

Callers 1

loSimplexFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected