static void Main() { Console.WriteLine("1)"); Grid2D grid = new Grid2D(3, 3, 1f, 1f); V5DataOnGrid v5DataOnGridInstance = new V5DataOnGrid("Example of service info", DateTime.Now, grid); v5DataOnGridInstance.InitRandom(-100f, 100f); Console.WriteLine(v5DataOnGridInstance.ToLongString() + "\n"); Console.WriteLine(((V5DataCollection)v5DataOnGridInstance).ToLongString() + "\n"); Console.WriteLine("2)"); V5MainCollection v5MainCollectionInstance = new V5MainCollection(); v5MainCollectionInstance.AddDefaults(); Console.WriteLine(v5MainCollectionInstance.ToString()); Console.WriteLine("3)"); foreach (V5Data dataElem in v5MainCollectionInstance) { Console.Write("---In---\n" + dataElem.ToLongString()); Console.WriteLine("---This elements are near equal---"); foreach (Vector2 measurement in dataElem.NearEqual(20.0f)) { Console.WriteLine(measurement.ToString()); } Console.WriteLine(); } Console.WriteLine("\nProgram finished successfully!"); }
public void AddDefaults() { Grid2D grid = new Grid2D(3, 3, 1.0f, 1.0f); for (int i = 0; i < 3; ++i) { V5DataOnGrid v5DataOnGridDefaultInstance = new V5DataOnGrid("Default V5DataOnGrid service info", new DateTime(1970, 1, 1), grid); v5DataOnGridDefaultInstance.InitRandom(-100.0f, 100.0f); LstData.Add(v5DataOnGridDefaultInstance); } for (int i = 0; i < 3; ++i) { V5DataCollection v5DataCollectionDefaultInstance = new V5DataCollection("Default V5MainCollection service info", new DateTime(1970, 1, 1)); v5DataCollectionDefaultInstance.InitRandom(5, 10.0f, 10.0f, -100.0f, 100.0f); LstData.Add(v5DataCollectionDefaultInstance); } }