Exemplo n.º 1
0
        public JointEdge GetCommonJoint(PipelineVertex pipelineVertex)
        {
            JointEdge commonJoint = null;

            foreach (var thisJoint in this.JointsEdge)
            {
                if (commonJoint == null)
                {
                    foreach (var thatJoint in pipelineVertex.JointsEdge)
                    {
                        if (thatJoint == thisJoint)
                        {
                            commonJoint = thisJoint;
                            break;
                        }
                    }
                }
            }

            return(commonJoint);
        }
Exemplo n.º 2
0
        public List <PipelineVertex> RemovalExternalComponents(
            construct.Joint startJoint,
            construct.Joint endJoint,
            List <PipelineVertex> path)
        {
            var joints = new construct.Joint[] { startJoint, endJoint };

            var parts = new PipelineVertex[] { path.First(), path.Last() };

            foreach (var part in parts)
            {
                if (part.JointsEdge.Count == 1)
                {
                    path.Remove(part);
                }
                else
                {
                    foreach (var jointEdge in part.JointsEdge)
                    {
                        if (!joints.Contains <construct.Joint>(jointEdge.Data))
                        {
                            foreach (var p in jointEdge.PartsVertex)
                            {
                                if (p != part &&
                                    !path.Contains <PipelineVertex>(p) &&
                                    path.Contains <PipelineVertex>(part))
                                {
                                    path.Remove(part);
                                }
                            }
                        }
                    }
                }
            }

            return(path);
        }
Exemplo n.º 3
0
        public JointEdge GetCommonJoint(PipelineVertex pipelineVertex)
        {
            JointEdge commonJoint = null;

            foreach (var thisJoint in this.JointsEdge)
            {
                if (commonJoint == null)
                {
                    foreach (var thatJoint in pipelineVertex.JointsEdge)
                    {
                        if (thatJoint == thisJoint)
                        {
                            commonJoint = thisJoint;
                            break;
                        }
                    }
                }
            }

            return commonJoint;
        }
Exemplo n.º 4
0
        public List<PipelineVertex> RemovalExternalComponents(
            construct.Joint startJoint,
            construct.Joint endJoint,
            List<PipelineVertex> path)
        {
            var joints = new construct.Joint[] { startJoint, endJoint };

            var parts = new PipelineVertex[] { path.First(), path.Last() };

            foreach (var part in parts)
            {
                if (part.JointsEdge.Count == 1)
                {
                    path.Remove(part);
                }
                else
                {
                    foreach (var jointEdge in part.JointsEdge)
                    {
                        if (!joints.Contains<construct.Joint>(jointEdge.Data))
                        {
                            foreach (var p in jointEdge.PartsVertex)
                            {
                                if (p != part
                                    && !path.Contains<PipelineVertex>(p)
                                    && path.Contains<PipelineVertex>(part))
                                {
                                    path.Remove(part);
                                }
                            }
                        }
                    }
                }
            }

            return path;
        }