Matrices/lower_tri.cpp
// this function helps retrieve the element at lower
// triangular index given by the formula below: 
this function helps retrieve the element at lower
triangular index given by the formula below.
this function helps retrieve the element at lower triangular index given by the formula below .
int Get(struct Matrix m, int i, int j)
{
    if(i>=j)
    {
        return m.A[i*(i-1)/2 + (j-1)];
    }
    else
    {
        return 0;
    }    
}
int Get ( struct Matrix m , int i , int j ) { if ( i >= j ) { return m . A [ i * ( i - 1 ) / 2 + ( j - 1 ) ] ; } else { return 0 ; } }
this function helps retrieve the element at lower
triangular index given by the formula below:
this function helps retrieve the element at lower triangular index given by the formula below :