예제 #1
0
    //--------------------------------------------------------------------
    protected void Test_Copy_Forward(DataStructures.GenericMatrixDimension <string> MD)
    {
        string[] vector = { };

        for (int ndxRound = MD.Min; ndxRound <= MD.Max; ndxRound++)
        {
            vector = MD.GetVector(MD.Min);
            for (int ndx = MD.Min; ndx <= (MD.Max - 1); ndx++)
            {
                MD.Copy(ndx + 1, ndx);
            }
            MD.SetVector(MD.Max, vector);
        }

        AssertEvenMatrix(MD.Matrix);
        return;
    }
예제 #2
0
    //--------------------------------------------------------------------
    protected void Test_Swap_Backward(DataStructures.GenericMatrixDimension <string> MD)
    {
        string[] vector = { };

        for (int ndxRound = MD.Min; ndxRound <= MD.Max; ndxRound++)
        {
            vector = MD.GetVector(MD.Max);
            for (int ndx = MD.Max; ndx >= (MD.Min + 1); ndx += -1)
            {
                MD.Swap(ndx, ndx - 1);
            }
            MD.SetVector(MD.Min, vector);
        }

        AssertEvenMatrix(MD.Matrix);
        return;
    }