Exemple #1
0
        private void SetStart(Graph2D graph, int start, HashSet <int> walkables)
        {
            int startPointPlaceX = ( int )this.startPointPlace.x;
            int startPointPlaceY = ( int )this.startPointPlace.y;

            int[] coord = graph.IndexToCoord(start);
            if (coord[0] + startPointPlaceX > this.col - 1)
            {
                coord[0] = this.col - 1 - startPointPlaceX;
            }
            if (coord[1] + startPointPlaceY > this.row - 1)
            {
                coord[1] = this.row - 1 - startPointPlaceY;
            }
            for (int i = 0; i < startPointPlaceX; i++)
            {
                int x = coord[0] + i;
                for (int j = 0; j < startPointPlaceY; j++)
                {
                    int y = coord[1] + j;
                    this.SetTileWalkable(graph.CoordToIndex(x, y), walkables);
                }
            }

            //计算起始范围的中点坐标(世界坐标)
            float i0 = (coord[0] + startPointPlaceX - coord[0]) * 0.5f + coord[0];
            float i1 = -(coord[1] + startPointPlaceY - coord[1]) * 0.5f - coord[1];

            this.centerOfStartRange = this._localToWorld.TransformPoint(new FVec3(i0, 0, i1));
        }
    public Molecula CalculateGraph()
    {
        var list = new List <Edge>();

        foreach (AtomView atom1 in atoms)
        {
            foreach (AtomView atom2 in atoms)
            {
                if (atom1.NodeNumber != atom2.NodeNumber)
                {
                    list.Add(new Edge(atom1, atom2, null));
                }
            }
        }
        var graph        = Graph2D.fromEdges(list);
        var bestMolecule = molecules.FindLast((molecule) => molecule.graph.nodes.IsSubsetListOf(graph.nodes, (node) => node.NodeCode));

        if (bestMolecule == null)
        {
            return(null);
        }
        var subgraph = Graph2D.mapToSubgraph(bestMolecule.graph, graph);

        return(new Molecula(subgraph, bestMolecule.info));
    }
Exemple #3
0
    // Called when the node enters the scene tree for the first time.
    public override void _Ready()
    {
        // getting root
        Graph2D graph = GetNode("Graph2D") as Graph2D;

        graph.autoScale = false;
        graph.logScale  = true;
        graph.SetAxisScale(new Vector2(1970, 2020), new Vector2((float)Math.Pow(10, -1), (float)Math.Pow(10, 8)));

        List <string> cores       = FileToString("Example/Data/microprocessor-trend-data-master/cores.txt");
        List <string> frequency   = FileToString("Example/Data/microprocessor-trend-data-master/frequency.txt");
        List <string> specint     = FileToString("Example/Data/microprocessor-trend-data-master/specint.txt");
        List <string> transistors = FileToString("Example/Data/microprocessor-trend-data-master/transistors.txt");
        List <string> watts       = FileToString("Example/Data/microprocessor-trend-data-master/watts.txt");

        List <Control> coreControls       = graph.AddPoints(StringToPoints(cores));
        List <Control> frequencyControls  = graph.AddPoints(StringToPoints(frequency));
        List <Control> transistorControls = graph.AddPoints(StringToPoints(transistors));
        List <Control> wattControls       = graph.AddPoints(StringToPoints(watts));

        graph.SetColour(coreControls, Constants.Colours[0]);
        graph.SetColour(frequencyControls, Constants.Colours[1]);
        graph.SetColour(transistorControls, Constants.Colours[2]);
        graph.SetColour(wattControls, Constants.Colours[3]);
        graph.xAxis.title.Text = "Year";
        graph.yAxis.title.Text = "Intensity";
        graph.Resize();
    }
    public static Graph2D mapToSubgraph(Graph2D thisGraph, Graph2D otherGraph)
    {
        int j = 0;
        var thisGraphNodes = thisGraph.nodes.OrderBy((node) => node.NodeCode).ToList();
        var otherNodes     = otherGraph.nodes.OrderBy((node) => node.NodeCode);
        var nodesMapping   = new Dictionary <int, Node>();

        foreach (Node otherNode in otherNodes)
        {
            if (j >= thisGraphNodes.Count)
            {
                break;
            }
            if (thisGraphNodes[j].NodeCode == otherNode.NodeCode)
            {
                nodesMapping[thisGraphNodes[j].NodeNumber] = otherNode;
                j++;
            }
        }

        var edgesMapping = new List <Edge>();

        foreach (Edge thisEdge in thisGraph.edges)
        {
            var first  = nodesMapping[thisEdge.first.NodeNumber];
            var second = nodesMapping[thisEdge.second.NodeNumber];
            edgesMapping.Add(new Edge(first, second, thisEdge.payload));
        }
        return(Graph2D.fromEdges(edgesMapping));
    }
Exemple #5
0
    public static Molecula MapToGraph2D(this MoleculaScriptableObject molecula)
    {
        var edges = molecula.edges.Select((edge) => new Edge(edge.first, edge.second, edge.payload)).ToList();
        var graph = Graph2D.fromEdges(edges);

        return(new Molecula(graph, molecula.info));
    }
Exemple #6
0
    protected Graph2D SelectDataGrapg2D(string id, string readable, string rich, string timely, string url, string name)
    {
        Graph2D sel = new Graph2D();

        sel.id = int.Parse(id);
        if (a == 0)
        {
            sel.x = float.Parse(rich);
            sel.y = float.Parse(timely);
        }
        else if (a == 1)
        {
            sel.x = float.Parse(readable);
            sel.y = float.Parse(timely);
        }
        else if (a == 2)
        {
            sel.x = float.Parse(readable);
            sel.y = float.Parse(rich);
        }
        sel.url = url;
        sel.url = url;
        if (name.Length > 10)
        {
            string titlename = name.Substring(0, 10) + "...";
            sel.name = titlename.Replace("\"", "");
        }
        else
        {
            sel.name = name.Replace("\"", "");
        }
        return(sel);
    }
Exemple #7
0
 private void CreateTiles(Graph2D graph)
 {
     this._tiles = new Tile[graph.size];
     for (int i = 0; i < graph.row; i++)
     {
         for (int j = 0; j < graph.col; j++)
         {
             int  index = graph.GetNode(i, j).index;
             Tile tile  = new Tile(index);
             tile.flag = Tile.Flag.Obstacle;
             if (i == 0 || i == graph.row - 1)
             {
                 tile.flag = Tile.Flag.Border;
             }
             if (j == 0 || j == graph.col - 1)
             {
                 tile.flag = Tile.Flag.Border;
             }
             tile.aabb = new FBounds
             {
                 min = new FVec3(j, 0, -(i + 1)) * this.scale,
                 max = new FVec3(j + 1, 1f, -i) * this.scale.z
             };
             this._tiles[index] = tile;
         }
     }
 }
Exemple #8
0
        public Graph CreateRandomGraph()
        {
            Graph newGraph = new Graph2D();

            newGraph.AppendAxis(new DateTimeAxis(0, AxisLocation.Bottom));
            newGraph.AppendAxis(new LinearAxis(1, AxisLocation.Left));

            AddRandomPlot(newGraph);

            return(newGraph);
        }
Exemple #9
0
        public IGraph AssembleGraph(int obstaclePercent = 0, params int[] sizes)
        {
            var graph    = new Graph2D(TestGraph2DDimensionSizes);
            var matrices = new Matrices(
                new VertexMatrix(graph),
                new CostMatrix(graph),
                new ObstacleMatrix(graph));

            matrices.Overlay();
            graph.ConnectVertices();
            return(graph);
        }
	void Awake(){
		//fColors = new Color[]{Color.green,Color.red};
		offset.x = (float)(height * 0.1);
		
		graph = new Graph2D(width,height);
		graphTex = graph.Draw(datapoints,offset,scale,Color.red,gridStep,1);
		//gf = new GraphFunction[]{Mathf.Sin,Mathf.Cos};	
		
		//fColors = new Color[]{Color.green,Color.red};
		
		//offset.x = width/2f;
		
		graph = new Graph2D(width,height);	
		//graphTex = graph.Draw(foo,offset,scale,Color.green,gridStep,1);
		graphTex = graph.Draw(datapoints,offset,scale,Color.red,gridStep,1);
		
	}
Exemple #11
0
 private void SetIndexToWalkable(Graph2D graph, int cx, int cy, int ex, int ey, HashSet <int> walkables)
 {
     if (cx + ex > this.col - 1)
     {
         cx = this.col - 1 - ex;
     }
     if (cy + ey > this.row - 1)
     {
         cy = this.row - 1 - ey;
     }
     for (int i = 0; i < ex; i++)
     {
         int x = cx + i;
         for (int j = 0; j < ey; j++)
         {
             int y = cy + j;
             this.SetTileWalkable(graph.CoordToIndex(x, y), walkables);
         }
     }
 }
Exemple #12
0
        private Graph2D CreateFullDigraph(FPseudoRandom random)
        {
            Graph2D graph = new Graph2D(this.row, this.col);

            for (int i = 1; i < this.row - 1; i++)
            {
                for (int j = 1; j < this.col - 1; j++)
                {
                    int       cur  = i * this.col + j;
                    GraphNode node = graph[cur];
                    if (j < this.col - 2)
                    {
                        node.AddEdge(cur, cur + 1, random.NextFloat());
                    }
                    if (j > 1)
                    {
                        node.AddEdge(cur, cur - 1, random.NextFloat());
                    }
                }
            }
            for (int i = 1; i < this.col - 1; i++)
            {
                for (int j = 1; j < this.row - 1; j++)
                {
                    int       cur  = j * this.col + i;
                    GraphNode node = graph[cur];
                    if (j < this.row - 2)
                    {
                        node.AddEdge(cur, cur + this.col, random.NextFloat());
                    }
                    if (j > 1)
                    {
                        node.AddEdge(cur, cur - this.col, random.NextFloat());
                    }
                }
            }
            return(graph);
        }
Exemple #13
0
        public Maze(FPseudoRandom random,
                    FVec3 scale, FVec3 offset, int row, int col,
                    int startIndex, int endIndex, FVec2 startPointPlace)
        {
            this.startPointPlace = startPointPlace;
            if (this.row < ( int )this.startPointPlace.y + 3 ||
                this.col < ( int )this.startPointPlace.x + 3)
            {
                throw new Exception("The row or col invaild");
            }

            this.scale  = scale;
            this.offset = offset;
            this.row    = row;
            this.col    = col;

            this._localToWorld = FMat4.FromTRS(this.offset, FQuat.identity, this.scale);
            this._worldToLocal = FMat4.NonhomogeneousInverse(this._localToWorld);

            //创建二维图
            Graph2D graph2 = this.CreateFullDigraph(random);

            //创建格子
            this.CreateTiles(graph2);

            //是否随机起点和终点
            this.startIndex = startIndex < 0 ? this.RandomIndexWithinBorder(random) : startIndex;
            if (endIndex < 0)
            {
                int[] candidate = new int[5];
                for (int i = 0; i < 5; i++)
                {
                    candidate[i] = this.RandomIndexWithinBorder(random);
                }
                endIndex = this.GetFarthestToStartIndex(this.startIndex, candidate);
            }
            this.endIndex = endIndex;

            //初始化起点范围
            HashSet <int> walkablesHs = new HashSet <int>();

            this.SetStart(graph2, this.startIndex, walkablesHs);

            //创建起点和终点
            int[]            coord       = graph2.IndexToCoord(this.startIndex);
            Delaunay.DVertex startVertex = new Delaunay.DVertex(coord[0], coord[1]);
            coord = graph2.IndexToCoord(this.endIndex);
            Delaunay.DVertex endVertex = new Delaunay.DVertex(coord[0], coord[1]);
            //创建外圆周附近的顶点
            List <Delaunay.DVertex> vertices1 = this.GenVertices(24, 1f, 0.8f, 24, random);
            //创建内圆周附近的顶点
            List <Delaunay.DVertex> vertices2 = this.GenVertices(12, 0.2f, 0.6f, 12, random);
            //合并所有顶点
            List <Delaunay.DVertex> vertices = new List <Delaunay.DVertex> {
                startVertex, endVertex
            };

            vertices.AddRange(vertices1);
            vertices.AddRange(vertices2);

            //点集合的三角化
            List <Delaunay.DTriangle> triangles = Delaunay.Triangulate(vertices);

            //从三角形集合创建图
            GraphBase graph = Tools.TrianglesToGraph(triangles, random.NextFloat);
            //Prim算法创建最小生成树
            List <GraphEdge> edges = GraphSearcher.PrimSearch(graph, triangles[0].v0);

            //每条边用A*算法生成路径
            int count = edges.Count;

            for (int i = 0; i < count; i++)
            {
                GraphEdge        edge = edges[i];
                Delaunay.DVertex v0   = vertices[edge.from];
                Delaunay.DVertex v1   = vertices[edge.to];
                int[]            path = GraphSearcher.AStarSearch(graph2, graph2.CoordToIndex(( int )v0.x, ( int )v0.y),
                                                                  graph2.CoordToIndex(( int )v1.x, ( int )v1.y));
                this.SetPathWalkable(path, walkablesHs);

                //把顶点扩展成房间
                if (i == 0)
                {
                    this.SetIndexToWalkable(graph2, ( int )v0.x, ( int )v0.y, random.Next(1, 3), random.Next(1, 3), walkablesHs);
                }
                this.SetIndexToWalkable(graph2, ( int )v1.x, ( int )v1.y, random.Next(1, 3), random.Next(1, 3), walkablesHs);
            }

            this.walkables = walkablesHs.ToArray();
        }
        //protected Line IntegrateCircle(float angle, float radius, out Graph2D graph, float time = 0)
        //{
        //}
        protected LineSet IntegrateCircles(float[] radii, float[] angles, out Graph2D[] graph, float time = 0)
        {
            // ~~~~~~~~~~~~~~~~~~ Initialize seed points. ~~~~~~~~~~~~~~~~~~~~ \\
            PointSet<Point> circle = new PointSet<Point>(new Point[radii.Length * angles.Length * 4]);
            //float angleDiff = 2 * (float)(Math.PI / LineX);
            for (int a = 0; a < angles.Length; ++a)
            {
                float x = (float)(Math.Sin(angles[a] + Math.PI / 2));
                float y = (float)(Math.Cos(angles[a] + Math.PI / 2));

                for (int r = 0; r < radii.Length; ++r)
                {
                    // Take the selection as center.
                    circle[(a * radii.Length + r)*4 + 0] = new Point() { Position = new Vector3(_selection.X + x * radii[r] + _epsOffset, _selection.Y + y * radii[r], time) };
                    circle[(a * radii.Length + r)*4 + 1] = new Point() { Position = new Vector3(_selection.X + x * radii[r] - _epsOffset, _selection.Y + y * radii[r], time) };
                    circle[(a * radii.Length + r)*4 + 2] = new Point() { Position = new Vector3(_selection.X + x * radii[r], _selection.Y + y * radii[r] + _epsOffset, time) };
                    circle[(a * radii.Length + r)*4 + 3] = new Point() { Position = new Vector3(_selection.X + x * radii[r], _selection.Y + y * radii[r] - _epsOffset, time) };
                }
            }

            // ~~~~~~~~~~~~ Integrate Pathlines and Adapt ~~~~~~~~~~~~~~~~~~~~~~~~ \\
            // Setup integrator.
            Integrator pathlineIntegrator = Integrator.CreateIntegrator(null, IntegrationType, _cores[_selectedCore], _repulsion);
            pathlineIntegrator.StepSize = StepSize;
            LineSet pathlines;

            // Count out the runs for debugging.

            // ~~~~~~~~~~~~ Integrate Pathlines  ~~~~~~~~~~~~~~~~~~~~~~~~ \\
            #region IntegratePathlines
            // Do we need to load a field first?
            if (_velocity.TimeOrigin > SliceTimeMain || _velocity.TimeOrigin + _velocity.Size.T < SliceTimeMain)
                LoadField(SliceTimeMain, MemberMain);

            // Integrate first few steps.
            pathlineIntegrator.Field = _velocity;
            Console.WriteLine("Starting integration of {0} pathlines", circle.Length);
            pathlines = pathlineIntegrator.Integrate(circle, false, 10)[0];

            // Append integrated lines of next loaded vectorfield time slices.
            //float timeEnd = (float)(12*15) / _everyNthTimestep + SliceTimeMain;
            //while (_currentEndStep + 1 < timeEnd)
            //{
            //    // Don't load more steps than we need to!
            //    int numSteps = (int)Math.Min(timeEnd - _currentEndStep, STEPS_IN_MEMORY);
            //    pathlineIntegrator.Field = null;
            //    LoadField(_currentEndStep, MemberMain, numSteps);

            //    // Integrate further.
            //    pathlineIntegrator.Field = _velocity;
            //    pathlineIntegrator.IntegrateFurther(pathlines);
            //}
            #endregion IntegratePathlines
            Console.WriteLine("Integrated all {0} pathlines", pathlines.Length);
            graph = FieldAnalysis.ComputeFTLE2D(pathlines, new Vector3(_selection, time), angles, radii, time, IntegrationTime);

            return pathlines;

            //            LineSet set = new LineSet(_coreAngleGraph);
            //GeometryWriter.WriteHeightCSV(RedSea.Singleton.DonutFileName + "Angle.csv", set);
            //            GeometryWriter.WriteToFile(RedSea.Singleton.DonutFileName + ".angle", set);

            //            set = new LineSet(_coreDistanceGraph);
            //GeometryWriter.WriteHeightCSV(RedSea.Singleton.DonutFileName + "Distance.csv", set);
            //            GeometryWriter.WriteToFile(RedSea.Singleton.DonutFileName + ".distance", set);
        }
        //protected Line IntegrateCircle(float angle, float radius, out Graph2D graph, float time = 0)
        //{
        //}
        protected LineSet IntegrateCircles(float[] radii, float[] angles, out Graph2D[][] graph, float time = 0)
        {
            // ~~~~~~~~~~~~~~~~~~ Initialize seed points. ~~~~~~~~~~~~~~~~~~~~ \\
            PointSet<Point> circle = new PointSet<Point>(new Point[radii.Length * angles.Length]);
            //float angleDiff = 2 * (float)(Math.PI / LineX);
            for (int a = 0; a < angles.Length; ++a)
            {
                float x = (float)(Math.Sin(angles[a] + Math.PI / 2));
                float y = (float)(Math.Cos(angles[a] + Math.PI / 2));

                for (int r = 0; r < radii.Length; ++r)
                {
                    // Take the selection as center.
                    circle[a * radii.Length + r] = new Point() { Position = new Vector3(_selection.X + x * radii[r], _selection.Y + y * radii[r], time) };
                }
            }

            // ~~~~~~~~~~~~ Integrate Pathlines and Adapt ~~~~~~~~~~~~~~~~~~~~~~~~ \\
            // Setup integrator.
            Integrator pathlineIntegrator = Integrator.CreateIntegrator(null, IntegrationType, _cores[_selectedCore], _repulsion);
            pathlineIntegrator.StepSize = StepSize;
            LineSet pathlines;

            // Count out the runs for debugging.
            int run = 0;

            // ~~~~~~~~~~~~ Integrate Pathlines  ~~~~~~~~~~~~~~~~~~~~~~~~ \\
            #region IntegratePathlines
            // Do we need to load a field first?
            if (_velocity.TimeOrigin > SliceTimeMain || _velocity.TimeOrigin + _velocity.Size.T < SliceTimeMain)
                LoadField(SliceTimeMain, MemberMain);

            // Integrate first few steps.
            pathlineIntegrator.Field = _velocity;
            pathlines = pathlineIntegrator.Integrate(circle, false)[0];

            // Append integrated lines of next loaded vectorfield time slices.
            float timeLength = STEPS_IN_MEMORY * 2 - 1/*RedSea.Singleton.NumSubstepsTotal / _everyNthTimestep / 4*/ + SliceTimeMain;
            while (_currentEndStep + 1 < timeLength)
            {
                // Don't load more steps than we need to!
                int numSteps = (int)Math.Min(timeLength - _currentEndStep, STEPS_IN_MEMORY);
                pathlineIntegrator.Field = null;
                LoadField(_currentEndStep, MemberMain, numSteps);

                // Integrate further.
                pathlineIntegrator.Field = _velocity;
                pathlineIntegrator.IntegrateFurther(pathlines);
            }
            #endregion IntegratePathlines

            // ~~~~~~~~~~~~ Get Boundary ~~~~~~~~~~~~~~~~~~~~~~~~ \\
            #region GetBoundary
            // The two needes functions.
            //Line[] distances = FieldAnalysis.GetGraph(_cores[_selectedCore], _selection, pathlines, (StepSize * _everyNthTimestep) / 24.0f, _everyNthTimestep, true);
            //Line[] angles = FieldAnalysis.GetGraph(_cores[_selectedCore], _selection, pathlines, (StepSize * _everyNthTimestep) / 24.0f, _everyNthTimestep, false);
            graph = FieldAnalysis.GetErrorsToTime(pathlines, angles.Length, radii);

            //graph[0].CutGraph((float)(Math.PI * 2));
            //Array.Resize(ref pathlines[0].Positions, graph[0].Length);
            //    FieldAnalysis.WriteXToLinesetAttribute(pathlines, graph);

            #endregion GetBoundary
            //LineSet[] subsets = new LineSet[angles.Length];
            //for(int s = 0; s < subsets.Length; ++ s)
            //{
            //    subsets[s] = new LineSet(pathlines, s * radii.Length, radii.Length);
            //}
            //return subsets;
            return pathlines;

            //            LineSet set = new LineSet(_coreAngleGraph);
            //GeometryWriter.WriteHeightCSV(RedSea.Singleton.DonutFileName + "Angle.csv", set);
            //            GeometryWriter.WriteToFile(RedSea.Singleton.DonutFileName + ".angle", set);

            //            set = new LineSet(_coreDistanceGraph);
            //GeometryWriter.WriteHeightCSV(RedSea.Singleton.DonutFileName + "Distance.csv", set);
            //            GeometryWriter.WriteToFile(RedSea.Singleton.DonutFileName + ".distance", set);
        }
        protected void BuildGraph()
        {
            float cutValue = 2000.0f;

            // Compute error.
            if (LineX == 0)
                return;
            _errorGraph = new Graph2D[_numSeeds];
            _allBoundaryPoints = new List<Point>();
            for (int seed = 0; seed < _numSeeds; ++seed)
            {
                // Smaller field: the difference diminishes it by one line.
                float[] fx = new float[LineX - 1];
                float[] x = new float[LineX - 1];
                for (int e = 0; e < fx.Length; ++e)
                {
                    if (_lineDistance[seed][e].Length <= 1)
                    {
                        fx[e] = float.MaxValue;
                        x[e] = _lineDistance[seed][e].Offset;
                    }
                    else
                    {
                        fx[e] = _lineDistance[seed][e].RelativeSumOver(IntegrationTime);// / _distanceDistance[index].Length;
                        x[e] = _lineDistance[seed][e].Offset;
                        if (fx[e] > cutValue)
                        {
                            Array.Resize(ref fx, e);
                            Array.Resize(ref x, e);
                            break;
                        }
                    }
                }

                _errorGraph[seed] = new Graph2D(x, fx);
                _errorGraph[seed].SmoothLaplacian(0.8f);
                _errorGraph[seed].SmoothLaplacian(0.8f);

                //var maxs = _errorGraph[seed].Maxima();
                //float angle = (float)((float)seed * Math.PI * 2 / _errorGraph.Length);
                //foreach (int p in maxs)
                //{
                //    float px = _errorGraph[seed].X[p];
                //    _allBoundaryPoints.Add(new Point(new Vector3(_selection.X + (float)(Math.Sin(angle + Math.PI / 2)) * px, _selection.Y + (float)(Math.Cos(angle + Math.PI / 2)) * px, cutValue)) { Color = Vector3.UnitX });
                //}

                //int[] errorBound = FieldAnalysis.FindBoundaryInError(_errorGraph[seed]);
                //foreach (int bound in errorBound)
                //    _allBoundaryPoints.Add(new Point(_pathlinesTime[seed * LineX + bound][0]));
            }
            //_boundariesSpacetime = FieldAnalysis.FindBoundaryInErrors(_errorGraph, new Vector3(_selection, SliceTimeMain));
            //_boundaryBallSpacetime = new LineBall(_linePlane, _boundariesSpacetime, LineBall.RenderEffect.HEIGHT, ColorMapping.GetComplementary(Colormap));
            //if (errorBound >= 0)
            //    _allBoundaryPoints.Add(new Point(_pathlinesTime[seed * LineX + errorBound][0]));
               //     GeometryWriter.WriteGraphCSV(RedSea.Singleton.DonutFileName + "Error.csv", _errorGraph);
            Console.WriteLine("Radii without boundary point: {0} of {1}", _numSeeds - _allBoundaryPoints.Count, _numSeeds);
            //   _graphPlane.ZAxis = Plane.ZAxis * WindowWidth;
            //    _boundaryCloud = new PointCloud(_graphPlane, new PointSet<Point>(_allBoundaryPoints.ToArray()));
            //LineSet lineCpy = new LineSet(_pathlinesTime);
            //lineCpy.CutAllHeight(_repulsion);
            //_pathlines = new LineBall(_linePlane, lineCpy, LineBall.RenderEffect.HEIGHT, Colormap, false);
            //int errorBound = FieldAnalysis.FindBoundaryInError(_errorGraph[0]);
            //_pathlinesTime.Cut(errorBound);
            // ~~~~~~~~~~~~ Get Boundary for Rendering ~~~~~~~~~~~~ \\

            // _pathlines = new LineBall(_linePlane, _pathlinesTime, LineBall.RenderEffect.HEIGHT, ColorMapping.GetComplementary(Colormap), Flat);

            // _graph = new LineBall(_graphPlane, FieldAnalysis.WriteGraphsToCircles(_distanceAngleGraph, new Vector3(_selection.X, _selection.Y, SliceTimeMain)), LineBall.RenderEffect.HEIGHT, Colormap, false);
            _graph = new LineBall(_graphPlane, FieldAnalysis.WriteGraphToSun(_errorGraph, new Vector3(_selection.X, _selection.Y, 0)), LineBall.RenderEffect.HEIGHT, Colormap, Flat);

            _rebuilt = false;
        }
                private void Run()
                {
                    DateTime start = DateTime.Now;

                    GReportBufferG.Clear(BackColor);

                    GReportBufferG.DrawString("gbp.AI.GeneticAlgorithms Environment initializing..", f, ForeColor1, 0, 0);
                    GReportBufferG.DrawString("started " + start.ToString(), f, ForeColor2, 0, 10);
                    GReportBufferG.DrawString("population size " + Size.ToString(), f, ForeColor2, 0, 20);
                    GReportBufferG.DrawString("crossover chance " + CrossoverChance.ToString(), f, ForeColor2, 0, 30);
                    GReportBufferG.DrawString("mutation chance " + MutationChance.ToString(), f, ForeColor2, 0, 40);

                    GReport.DrawImage(GReportBuffer, 0, 0);

                    GenerationBests = new ArrayList(100);

                    Graph2D gfitness = new Graph2D(3, GReportBufferG, new RectangleF(280, 5, 200, 140), BackColor, Color.DarkOrange);
                    gfitness.SetComponent(0, "average raw fitness", Color.Orange);
                    gfitness.SetComponent(1, "worst raw fitness", Color.DarkOrange);
                    gfitness.SetComponent(2, "best raw fitness", Color.Yellow);

                    Graph2D gdiversity = new Graph2D(1, GReportBufferG, new RectangleF(490, 5, 200, 140), BackColor, Color.DarkOrange);
                    gdiversity.SetComponent(0, "diversity", Color.Orange);

                    GraphHistogram ghistogram = new GraphHistogram("raw fitness distribution", 15, GReportBufferG, new RectangleF(700, 5, 200, 140), BackColor, Color.DarkOrange, Color.DarkOrange);

                    for (int g = 0 ; g < Generations && !Abort ; g++)
                    {
                        GReport3BufferG.Clear(BackColor);
                        GReport3BufferG.DrawString("GENERATION " + g.ToString(), f2, ForeColor1, 0, 0);
                        GReport3.DrawImage(GReport3Buffer, 0, 0);

                        GiveFitnesses(g);

                        GReportBufferG.Clear(BackColor);

                        GReportBufferG.DrawString("gbp.AI.GeneticAlgorithms Environment running..", f, ForeColor1, 0, 0);
                        GReportBufferG.DrawString("started " + start.ToString(), f, ForeColor2, 0, 10);
                        GReportBufferG.DrawString("population size " + Size.ToString(), f, ForeColor2, 0, 20);
                        GReportBufferG.DrawString("crossover chance " + CrossoverChance.ToString(), f, ForeColor2, 0, 30);
                        GReportBufferG.DrawString("mutation chance " + MutationChance.ToString(), f, ForeColor2, 0, 40);

                        GReportBufferG.DrawString("generation " + g.ToString() + ":", f, ForeColor1, 0, 60);
                        GReportBufferG.DrawString("average raw fitness " + AverageRawFitness.ToString(), f, ForeColor2, 0, 70);
                        GReportBufferG.DrawString("diversity " + Diversity.ToString(), f, ForeColor2, 0, 80);

                        GReportBufferG.DrawString("best individual:", f, ForeColor1, 0, 120);
                        GReportBufferG.DrawString("raw fitness " + Individuals[BestIndex].RawFitness.ToString(), f, ForeColor2, 0, 130);
                        GReportBufferG.DrawString("fitness " + Individuals[BestIndex].Fitness.ToString(), f, ForeColor2, 0, 140);

                        gfitness.AddValue(0, AverageRawFitness);
                        gfitness.AddValue(1, Individuals[WorstIndex].RawFitness);
                        gfitness.AddValue(2, Individuals[BestIndex].RawFitness);
                        gfitness.Draw();

                        gdiversity.AddValue(0, Diversity);
                        gdiversity.Draw();

                        float[] rawfitnesses = new float[Size];
                        for (int i = 0 ; i < Size ; i++)
                            rawfitnesses[i] = Individuals[i].RawFitness;

                        ghistogram.SetValues(rawfitnesses);
                        ghistogram.Draw();

                        GReport.DrawImage(GReportBuffer, 0, 0);

                        GenerationBests.Add(Individuals[BestIndex]);

                        if (Individuals[BestIndex].RawFitness >= FitnessTreshold)
                        {
                            SF(Individuals[BestIndex].Genome, g);
                            break;
                        }

                        NextGeneration();
                    }
                    STP();
                }
Exemple #18
0
                private void Run()
                {
                    DateTime start = DateTime.Now;

                    GReportBufferG.Clear(BackColor);

                    GReportBufferG.DrawString("gbp.AI.GeneticAlgorithms Environment initializing..", f, ForeColor1, 0, 0);
                    GReportBufferG.DrawString("started " + start.ToString(), f, ForeColor2, 0, 10);
                    GReportBufferG.DrawString("population size " + Size.ToString(), f, ForeColor2, 0, 20);
                    GReportBufferG.DrawString("crossover chance " + CrossoverChance.ToString(), f, ForeColor2, 0, 30);
                    GReportBufferG.DrawString("mutation chance " + MutationChance.ToString(), f, ForeColor2, 0, 40);

                    GReport.DrawImage(GReportBuffer, 0, 0);

                    GenerationBests = new ArrayList(100);

                    Graph2D gfitness = new Graph2D(3, GReportBufferG, new RectangleF(280, 5, 200, 140), BackColor, Color.DarkOrange);

                    gfitness.SetComponent(0, "average raw fitness", Color.Orange);
                    gfitness.SetComponent(1, "worst raw fitness", Color.DarkOrange);
                    gfitness.SetComponent(2, "best raw fitness", Color.Yellow);

                    Graph2D gdiversity = new Graph2D(1, GReportBufferG, new RectangleF(490, 5, 200, 140), BackColor, Color.DarkOrange);

                    gdiversity.SetComponent(0, "diversity", Color.Orange);

                    GraphHistogram ghistogram = new GraphHistogram("raw fitness distribution", 15, GReportBufferG, new RectangleF(700, 5, 200, 140), BackColor, Color.DarkOrange, Color.DarkOrange);

                    for (int g = 0; g < Generations && !Abort; g++)
                    {
                        GReport3BufferG.Clear(BackColor);
                        GReport3BufferG.DrawString("GENERATION " + g.ToString(), f2, ForeColor1, 0, 0);
                        GReport3.DrawImage(GReport3Buffer, 0, 0);

                        GiveFitnesses(g);

                        GReportBufferG.Clear(BackColor);

                        GReportBufferG.DrawString("gbp.AI.GeneticAlgorithms Environment running..", f, ForeColor1, 0, 0);
                        GReportBufferG.DrawString("started " + start.ToString(), f, ForeColor2, 0, 10);
                        GReportBufferG.DrawString("population size " + Size.ToString(), f, ForeColor2, 0, 20);
                        GReportBufferG.DrawString("crossover chance " + CrossoverChance.ToString(), f, ForeColor2, 0, 30);
                        GReportBufferG.DrawString("mutation chance " + MutationChance.ToString(), f, ForeColor2, 0, 40);

                        GReportBufferG.DrawString("generation " + g.ToString() + ":", f, ForeColor1, 0, 60);
                        GReportBufferG.DrawString("average raw fitness " + AverageRawFitness.ToString(), f, ForeColor2, 0, 70);
                        GReportBufferG.DrawString("diversity " + Diversity.ToString(), f, ForeColor2, 0, 80);

                        GReportBufferG.DrawString("best individual:", f, ForeColor1, 0, 120);
                        GReportBufferG.DrawString("raw fitness " + Individuals[BestIndex].RawFitness.ToString(), f, ForeColor2, 0, 130);
                        GReportBufferG.DrawString("fitness " + Individuals[BestIndex].Fitness.ToString(), f, ForeColor2, 0, 140);


                        gfitness.AddValue(0, AverageRawFitness);
                        gfitness.AddValue(1, Individuals[WorstIndex].RawFitness);
                        gfitness.AddValue(2, Individuals[BestIndex].RawFitness);
                        gfitness.Draw();

                        gdiversity.AddValue(0, Diversity);
                        gdiversity.Draw();

                        float[] rawfitnesses = new float[Size];
                        for (int i = 0; i < Size; i++)
                        {
                            rawfitnesses[i] = Individuals[i].RawFitness;
                        }

                        ghistogram.SetValues(rawfitnesses);
                        ghistogram.Draw();

                        GReport.DrawImage(GReportBuffer, 0, 0);

                        GenerationBests.Add(Individuals[BestIndex]);

                        if (Individuals[BestIndex].RawFitness >= FitnessTreshold)
                        {
                            SF(Individuals[BestIndex].Genome, g);
                            break;
                        }

                        NextGeneration();
                    }
                    STP();
                }
 public AstarPlanarAlgorithm(Graph2D graph2D)
 {
     _graph2D = graph2D;
 }
Exemple #20
0
 public ObstacleMatrix(Graph2D graph)
     : base(graph)
 {
     matrix = new bool[, ]
     {
         { I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, O, O, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, O, I, I, O, O, I, I, I, O, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, O },
         { I, O, O, I, I, I, I, I, I, O, I, O, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I },
         { I, O, I, O, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, O },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, O, I, I, O, O, I, O, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, O, O, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, O, I, O, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, O, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, O, O, I, I, I, I, O, O, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I },
         { I, I, I, I, O, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, O, I, I, O, I, I, I },
         { I, I, I, I, I, O, O, I, I, I, O, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, O, I, I, I, I, I, I, O, O },
         { I, O, I, I, I, I, I, I, I, O, I, O, I, I, I, O, I, I, O, I, I, I, O, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I },
         { I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I },
         { I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, O, O, I, I, I, I, I, I, I, O, I, I, O, I },
         { I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, O, I, O, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O },
         { I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I },
         { O, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, O, I, O },
         { I, I, I, I, I, I, O, I, I, I, I, I, O, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I, I },
         { O, I, I, I, I, I, O, I, O, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, O, I, I, I, I, I, I, I, I, I, O, O, I, O, O, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, O, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I },
         { I, I, I, O, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I },
         { I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, O, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, O, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I },
         { O, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I },
         { O, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, O, I, I, I, I, I, I, O, O, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { O, I, I, I, O, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, O, I, I, O, O, I, I, I, O, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, O },
         { I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, O },
         { I, I, I, I, I, O, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O },
         { I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, O, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, O, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, O },
         { I, O, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I },
         { I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, O, I, I, O, I, I, I },
         { O, O, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, O, I, I, I, I, O, I, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I },
         { O, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, O },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, O, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I, I, I, I, I, I, O, I },
         { I, I, I, I, I, I, I, I, O, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, O, I, I, O, I, I, I, I, I, O, I, O, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I },
         { O, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, O, O, I, O, I, I, I, I, I },
         { O, O, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I },
         { I, I, I, I, I, I, I, O, I, I, I, I, I, O, O, I, O, I, I, I, I, I, I, I, O, I, I, O, I, I, I, I, I, O, I, I, I, I, O, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, O, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I },
         { I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I, O, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, O, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, I, I, I, O, I, O, I, I, I, I, I, I },
         { I, I, I, I, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, O, O, I, O, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I }
     };
 }
Exemple #21
0
 /// <summary>
 /// Scales a vector of x-coordinates to fit a given volume.
 /// </summary>
 /// <param name="Vector">Vector.</param>
 public double[] ScaleX(IVector Vector)
 {
     return(Graph2D.Scale(Vector, this.minX, this.maxX, this.offsetX, this.width));
 }
Exemple #22
0
 /// <summary>
 /// Scales a vector of z-coordinates to fit a given volume.
 /// </summary>
 /// <param name="Vector">Vector.</param>
 public double[] ScaleZ(IVector Vector)
 {
     return(Graph2D.Scale(Vector, this.maxZ, this.minZ, this.offsetZ, this.depth));
 }
Exemple #23
0
 /// <summary>
 /// Scales a vector of y-coordinates to fit a given volume.
 /// </summary>
 /// <param name="Vector">Vector.</param>
 public double[] ScaleY(IVector Vector)
 {
     return(Graph2D.Scale(Vector, this.minY, this.maxY, this.offsetY, this.height));
 }
 public VertexMatrix(Graph2D graph)
 {
     this.graph = graph;
 }
Exemple #25
0
 private static int CountDesiredWindowHeight(Graph2D graph)
 {
     return((graph.Length + LengthOffset) * DistanceBetweenVertices);
 }
Exemple #26
0
 private static int CountDesiredWindowWidth(Graph2D graph)
 {
     return((graph.Width + WidthOffset) * DistanceBetweenVertices);
 }
Exemple #27
0
 protected virtual void Start()
 {
     _Graph2D = GetComponent <Graph2D>();
     CreateGraph();
 }
 public Molecula(Graph2D graph, MoleculaInfo info)
 {
     this.graph = graph;
     this.info  = info;
 }
Exemple #29
0
 protected BaseMatrix(Graph2D graph)
 {
     this.graph = graph;
 }
 public IMUClass(FrmMain parent)
 {
     GraphXY = parent.GraphXY;
     GraphXZ = parent.GraphXZ;
     GraphYZ = parent.GraphYZ;
 }
Exemple #31
0
 public CostMatrix(Graph2D graph) : base(graph)
 {
     matrix = new int[, ]
     {
         { 1, 5, 8, 3, 6, 1, 3, 3, 8, 6, 1, 6, 6, 8, 2, 7, 3, 8, 8, 4, 4, 2, 5, 1, 7, 2, 4, 1, 1, 3, 2, 1, 1, 5, 5, 7, 2, 4, 8, 3, 2, 6, 4, 1, 6 },
         { 6, 4, 8, 1, 8, 3, 7, 4, 6, 3, 6, 4, 1, 8, 8, 4, 1, 1, 2, 6, 1, 3, 3, 6, 8, 6, 3, 8, 6, 6, 6, 2, 6, 7, 7, 2, 4, 1, 7, 8, 2, 6, 2, 5, 6 },
         { 5, 4, 2, 7, 3, 3, 8, 3, 8, 6, 1, 5, 7, 5, 3, 2, 1, 7, 4, 2, 6, 4, 6, 2, 6, 4, 1, 3, 2, 3, 6, 4, 7, 4, 2, 6, 1, 8, 6, 2, 8, 5, 5, 8, 5 },
         { 5, 2, 2, 6, 2, 2, 1, 3, 8, 8, 3, 7, 6, 5, 3, 1, 6, 7, 4, 3, 2, 6, 1, 8, 3, 5, 5, 7, 5, 5, 3, 8, 7, 4, 3, 8, 6, 8, 5, 1, 2, 7, 5, 8, 5 },
         { 7, 6, 8, 1, 6, 2, 6, 5, 2, 6, 7, 2, 7, 5, 1, 6, 7, 4, 7, 7, 4, 7, 2, 6, 8, 1, 7, 1, 5, 6, 6, 6, 4, 5, 4, 4, 7, 3, 6, 6, 7, 2, 3, 1, 7 },
         { 4, 4, 5, 2, 6, 3, 8, 8, 1, 1, 2, 2, 8, 3, 5, 5, 2, 8, 5, 8, 5, 6, 3, 2, 5, 8, 6, 7, 1, 3, 4, 4, 7, 6, 6, 7, 2, 8, 5, 5, 5, 3, 2, 8, 5 },
         { 7, 3, 2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