Ejemplo n.º 1
0
 public void ShowData <T>(Pmc <T> containers)
 {
     foreach (var container in containers)
     {
         Console.WriteLine("Container: ");
         foreach (var matrix in container)
         {
             Console.WriteLine("\tMatrix: ");
             foreach (var position in matrix)
             {
                 Console.WriteLine("\t\tPosition: ");
                 foreach (var point in position)
                 {
                     Console.WriteLine($"\t\t\t{point.Dimension} - ");
                     foreach (var value in point.DataValue)
                     {
                         Console.WriteLine($"\t\t\t\t{value}");
                     }
                 }
                 Console.WriteLine();
             }
             Console.WriteLine();
         }
         Console.WriteLine();
     }
 }
Ejemplo n.º 2
0
 public void TestSetup()
 {
     _data   = 5;
     _config = new PmcConfiguration
     {
         CountContainers = 1,
         CountMatrices   = 1,
         CountPositions  = 1,
         CountPoints     = 1
     };
     _developer = new ContainerCollectionDeveloper <int>(_config);
     _pmc       = _developer.Create(_data);
 }
Ejemplo n.º 3
0
        public void TestSetup()
        {
            _data = 18.5;

            _config = new PmcConfiguration
            {
                CountContainers = 10,
                CountPositions  = 10,
                CountMatrices   = 10,
                MatrixConfig    = new MatrixConfiguration
                {
                    MatrixNumberToDimensionRules = new List <MatrixNumberToDimension>
                    {
                        new MatrixNumberToDimension
                        {
                            Dimension        = PointDimension.Xy,
                            IndexInContainer = new List <int>
                            {
                                0,
                                1,
                                2,
                                3,
                                4
                            }
                        },
                        new MatrixNumberToDimension
                        {
                            Dimension        = PointDimension.X,
                            IndexInContainer = new List <int>
                            {
                                5,
                                6,
                                7,
                                8,
                                9
                            }
                        }
                    }
                }
            };

            _developer = new ContainerCollectionDeveloper <double>(_config);
            _pmc       = _developer.Create(_data);
        }
Ejemplo n.º 4
0
        public void TestSetup()
        {
            _data = 5;

            _pos1XYpointsCount       = 50;
            _pos2XYpointsCount       = 200;
            _posDefaultXYpointsCount = 0;

            _pos1XpointsCount       = _pos2XpointsCount = 1;
            _posDefaultXpointsCount = 0;

            _config = new PmcConfiguration
            {
                CountContainers = 3,
                CountPositions  = 100,
                CountMatrices   = 2,
                MatrixConfig    = new MatrixConfiguration
                {
                    MatrixNumberToDimensionRules = new List <MatrixNumberToDimension>
                    {
                        new MatrixNumberToDimension
                        {
                            Dimension        = PointDimension.Xy,
                            IndexInContainer = new List <int>
                            {
                                0
                            }
                        },
                        new MatrixNumberToDimension
                        {
                            Dimension        = PointDimension.X,
                            IndexInContainer = new List <int>
                            {
                                1
                            }
                        }
                    }
                },
                XyConfig = new XyConfiguration
                {
                    Rules = new List <XyRule>
                    {
                        new XyRule
                        {
                            CountPoints = _pos1XYpointsCount,
                            Path        = new PointPath
                            {
                                IndexInMatrix = 0
                            }
                        },
                        new XyRule
                        {
                            CountPoints = _pos2XYpointsCount,
                            Path        = new PointPath
                            {
                                IndexInMatrix = 1
                            }
                        }
                    },
                    DefaultCountPoints = _posDefaultXYpointsCount
                },
                XConfig = new XConfiguration
                {
                    DefaultCountPoints = _posDefaultXpointsCount,
                    Rules = new List <XRule>
                    {
                        new XRule
                        {
                            CountPoints = _pos1XpointsCount,
                            Path        = new PointPath
                            {
                                IndexInMatrix = 0
                            }
                        },
                        new XRule
                        {
                            CountPoints = _pos2XpointsCount,
                            Path        = new PointPath
                            {
                                IndexInMatrix = 1
                            }
                        }
                    }
                }
            };
            _developer = new ContainerCollectionDeveloper <int>(_config);
            _pmc       = _developer.Create(_data);
        }