public Matrix this[Func<Vector, bool> f, VectorType t]
{
get
{
int count = 0;
if (t == VectorType.Row)
{
for (int i = 0; i < Rows; i++)
if (f(this[i, t]))
count++;
Matrix m = new Matrix(count, Cols);
int j = -1;
for (int i = 0; i < Rows; i++)
if (f(this[i, t]))
m[++j, t] = this[i, t];
return m;
}
else
{
for (int i = 0; i < Cols; i++)
if (f(this[i, t]))
count++;
Matrix m = new Matrix(Rows, count);
int j = -1;
for (int i = 0; i < Cols; i++)
if (f(this[i, t]))
m[++j, t] = this[i, t];
return m;
}
}
}