Matrix::DisableSubrange Method

void DisableSubrange() const;

Prevents calls to Matrix::SetSubRange.

Remarks:

Prevents calls to Matrix::SetSubRange method. This can be usefull guard when an object is already working on a subrange and the user would like to further subrange an already subranged object. When subranging matrices in-place, they are temporariliy converted to a vector by settings Rows to 1 and Cols to Length.

Examples
#include "MtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Matrix a;
    Vector b;

    a.SetIt(3, 3, false, DewArray<double>{1, 2, 3, 4, 5, 6, 7, 8, 9});
    a.SetSubRange(0, 2);  //a = [1,2]
    a.DisableSubrange();
    try
    {
        a.SetSubRange(2, 2); //exception raised here
    }
    catch (tException&)
    {
    }

    b.SetSubRange(a, 0, 2); //but this will work
    a.SetFullRange(); //b is not changed, it still points to [1,2]
}
See Also: Matrix::DisableSubrange, Matrix::EnableSubrange
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler