示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="g">graph to plot</param>
        /// <param name="prefix">prefix of generated images</param>
        /// <param name="outputPath">output path for image files</param>
        /// <param name="imageType">ouput type</param>
        public AlgorithmTracerVisitor(
            IVertexAndEdgeListGraph g,
            String prefix,
            String outputPath,
            GraphvizImageType imageType
            )
        {
            if (prefix == null)
            {
                throw new ArgumentNullException("prefix");
            }
            if (outputPath == null)
            {
                throw new ArgumentNullException("tempPath");
            }

            m_VertexLabels = null;
            m_EdgeLabels   = null;

            m_Colors     = null;
            m_EdgeColors = new EdgeColorDictionary();

            m_FileName    = prefix;
            m_CurrentFile = 0;

            m_Algo = new GraphvizAlgorithm(g, outputPath, imageType);
            m_Algo.RegisterVisitor(this);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="g"></param>
        /// <param name="prefix"></param>
        /// <param name="path"></param>
        /// <param name="imageType"></param>
        public AlgorithmTracerVisitor(
            IVertexAndEdgeListGraph g,
            String prefix,
            String path,
            GraphvizImageType imageType
            )
        {
            m_Vertex = new GraphvizVertex();
            m_Vertex.Shape = GraphvizVertexShape.Circle;
            m_Vertex.Style = GraphvizVertexStyle.Filled;
            m_VertexLabels =null;

            m_Edge = new GraphvizEdge();
            m_EdgeLabels = null;

            m_Colors = null;
            m_EdgeColors = new EdgeColorDictionary();

            m_Algo = new GraphvizAlgorithm(g,prefix,path,imageType);
            m_Algo.RegisterVisitor(this);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="g"></param>
        /// <param name="prefix"></param>
        /// <param name="path"></param>
        /// <param name="imageType"></param>
        public AlgorithmTracerVisitor(
            IVertexAndEdgeListGraph g,
            String prefix,
            String path,
            GraphvizImageType imageType
            )
        {
            m_Vertex       = new GraphvizVertex();
            m_Vertex.Shape = GraphvizVertexShape.Circle;
            m_Vertex.Style = GraphvizVertexStyle.Filled;
            m_VertexLabels = null;

            m_Edge       = new GraphvizEdge();
            m_EdgeLabels = null;

            m_Colors     = null;
            m_EdgeColors = new EdgeColorDictionary();

            m_Algo = new GraphvizAlgorithm(g, prefix, path, imageType);
            m_Algo.RegisterVisitor(this);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="g">graph to plot</param>
        /// <param name="prefix">prefix of generated images</param>
        /// <param name="outputPath">output path for image files</param>
        /// <param name="imageType">ouput type</param>
        public AlgorithmTracerVisitor(
            IVertexAndEdgeListGraph g,
            String prefix,
            String outputPath,
            GraphvizImageType imageType
            )
        {
            if (prefix==null)
                throw new ArgumentNullException("prefix");
            if (outputPath==null)
                throw new ArgumentNullException("tempPath");

            m_VertexLabels =null;
            m_EdgeLabels = null;

            m_Colors = null;
            m_EdgeColors = new EdgeColorDictionary();

            m_FileName = prefix;
            m_CurrentFile = 0;

            m_Algo = new GraphvizAlgorithm(g,outputPath,imageType);
            m_Algo.RegisterVisitor(this);
        }