예제 #1
0
 /// <summary>
 /// Base class for implementing a Node to include into a Graph.
 /// </summary>
 /// <param name="graphFilter">The graph that holds this node.</param>
 /// <param name="parent">The parent node of this node. Set to null if this is the root node.</param>
 public Node(Graph graphFilter, Node parent)
 {
     _children = new List<Node>();
     _graphFilter = graphFilter;
     _parent = parent;
     _duration = TimeSpan.Zero;
 }
예제 #2
0
 /// <summary>
 /// Node that executes a certain filter.
 /// </summary>
 /// <param name="graphFilter">The graph that holds this node.</param>
 /// <param name="filter">The filter to execute.</param>
 /// <param name="configs">The configurations of the filter to execute.</param>
 /// <param name="measures">The measures to calculate.</param>
 public NodeFilter(
             Graph graphFilter, Node parent, Filter filter,
             SortedDictionary<string, object> configs,
             List<MetricExecBase> measures)
     : base(graphFilter, parent)
 {
     this.filter = filter;
     this.configs = configs;
     this.measures = measures;
 }
예제 #3
0
        ///// <summary>
        ///// BatchFilter from XML file.
        ///// </summary>
        ///// <param name="_filename"></param>
        //public BatchFilter(String _filename)
        //    : this()
        //{
        //    Load(_filename);
        //}
        /// <summary>
        /// BatchFilter from managed structures.
        /// </summary>
        /// <param name="relations">The parent-child relations between the existing nodes.</param>
        /// <param name="images">The inputs for the BatchFilter.</param>
        /// <param name="filters">The filters to execute.</param>
        public BatchFilter(
                List<RowNodeRelation> relations, List<RowImage> images, List<RowBatchFilter> filters)
        {
            _inputImages = new List<WeakImage>();

            foreach (RowImage r in images)
            {
                _inputImages.Add(r.Item1);
            }

            _graph = new Graph(this, relations, filters);
            _graph.FilterExecuted += new Graph.FilterExecutedDelegate(_graph_FilterExecuted);
            _graph.FilterMeasured += new Graph.FilterMeasuredDelegate(_graph_FilterMeasured);
        }