Mathc matrices/05u
GJ_PP_FreeV_mR(); | GJ_PP_FreeV_Value0_mR(); |
---|---|
/* ------------------------------------ */
/* ------------------------------------ */
double **GJ_PP_FreeV_mR(
double **Ab,
double **b_free
)
{
double **new_Ab;
int rsize_Ab = rsize_R(Ab);
int r;
new_Ab = i_Abr_Ac_bc_mR(csize_A_R(Ab),
csize_A_R(Ab),
C2);
c_nr_mR(Ab,rsize_Ab,new_Ab);
zero4_under_all_pivot_mR(new_Ab);
put_freeV_TP_mR(new_Ab,rsize_Ab);
r=Ab[C_SIZE_A][C0]-C1;
while( r>R1 )
zero_below_pivot_gj1Ab_mR(new_Ab,r--);
sort_c_mR(new_Ab);
sort_r_mR(new_Ab);
c_Ab_b_mR(new_Ab,b_free);
f_mR(new_Ab);
return(b_free);
}
/* ------------------------------------ */
/* ------------------------------------ */
|
/* ------------------------------------ */
/* ------------------------------------ */
void GJ_PP_FreeV_Value0_mR(
double **Ab,
double **b_free
)
{
double **new_Ab;
/* int r_not_0 = rsize_R(Ab) -
((csize_R(Ab) - csize_A_R(Ab)-C1) -C1); */
int r_not_0 = 2*rsize_R(Ab) - csize_R(Ab) + C2;
int r;
new_Ab = i_Abr_Ac_bc_mR(rsize_R(Ab),
csize_A_R(Ab),
csize_R(Ab)-rsize_R(Ab));
c_mR(Ab,new_Ab);
zero4_under_all_pivot_mR(new_Ab);
put_freeV_TP_mR(new_Ab,r_not_0);
r=Ab[C_SIZE_A][C0]-C1;
while( r>R1 )
zero_below_pivot_gj1Ab_mR(new_Ab,r--);
sort_c_mR(new_Ab);
sort_r_mR(new_Ab);
c_Ab_b_mR(new_Ab,b_free);
f_mR(new_Ab);
return(b_free);
}
/* ------------------------------------ */
/* ------------------------------------ */
|