I have nested list to perform as 2D array:
public List<List<float?>> arrayFloatValue = new List<List<float?>>();
This nested list has 2000 columns in parent and 20000 float values in child array. Now I want to match repeated rows and remove from sub list. Below is sample code.
//Define capacity
int ColumnsCount = 2000;
int RowsCount = 20000;
//Create object
public List<List<float?>> arrayFloatValue = new List<List<float?>>();
//Initiate parent list i.e. 2000
arrayFloatValue = new List<float?>[ColumnsCount].ToList();
//Initiate child list i.e. 20000
for (int i = 0; i < ColumnsCount; i++)
{
arrayFloatValue[i] = new float?[RowsCount].ToList();
}
//Fill dummy data.
for (int x = 0; x < ColumnsCount; x++)
{
for (int y = 0; y < RowsCount; y++)
{
if (y % 50 != 0)
arrayFloatValue[x][y] = x + y; // Assign dummy value
else
arrayFloatValue[x][y] = 0; // Forcefully 0 value added for each 50th row.
}
}
Now I have array like
// [0] [0] [1] [0] [2] [0] ...
// [1] [2] [3] ...
// [2] [3] [4] ...
// [3] [4] [5] ...
// [4] [5] [6] ...
// [5] [6] [7] ...
// [6] [7] [8] ...
// [7] [8] [9] ...
// [8] [9] [10] ...
// [9] [10] [11] ...
// ... ... ...
// [49] [50] [51] ...
// [0] [0] [0] ...
//
// And so on..
//
Now I want to remove repeated values in each column. Here in above example I have 0
value as repeated at each row index like 50
th, 100t
h 150
th .... so on. I want to remove these rows.
> arrayFloatValue = new List
– Prem Aug 16 '18 at 13:36>(); This nested list has 2000 columns in parent and 20000 float values in child array. Now I want to match repeated rows in each row and remove it. I dont have enough code now.