Ejemplo n.º 1
0
        private static DataTable ToDataTable(ACQ.Math.Linalg.Vector vector)
        {
            DataTable table = new DataTable(vector.GetType().ToString());

            DataColumn column;
            DataRow    row;

            column            = new DataColumn();
            column.DataType   = System.Type.GetType("System.Double");
            column.ColumnName = "value";
            column.ReadOnly   = true;
            table.Columns.Add(column);

            // Create three new DataRow objects and add
            // them to the DataTable
            for (int i = 0; i < vector.Size; i++)
            {
                row          = table.NewRow();
                row["value"] = vector[i];
                table.Rows.Add(row);
            }
            return(table);
        }