Open gadamico opened 8 years ago
Yep. I would recommend giving them names that reflect what they are (e.g. lower
or L
for a lower triangular matrix).
Just because a function argument is given the name out
doesn't mean that anything passed to it needs to be named out
. A simple example is the following:
int square(int out)
{
return out*out;
}
This can be called like so
int myvar = 2;
int another_var = square(myvar) // doesn't need to be called "out"
another_var = square(10); // literals don't even have a variable name
In constructing
jacobi.c
andgauss_seidel.c
it seems prudent to call functions constructed in earlier parts of the homework. In the functions that return only by reference we used a variableout
to store the result. But when calling several such functions from, say,jacobi.c
, I suppose we'd need to create and use several distinct "out
" variables to keep them all straight?