Пример #1
0
        public MatrixListGraph(IGenericPropertyGraph<UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object> PropertyGraph,

                               VertexFilter         <UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object> VertexFilter = null,

                               EdgeFilter           <UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object,
                                                     UInt64, Int64, String, String, Object> EdgeFilter   = null,

                               Func<IReadOnlyGenericPropertyVertex<UInt64, Int64, String, String, Object,
                                                                   UInt64, Int64, String, String, Object,
                                                                   UInt64, Int64, String, String, Object,
                                                                   UInt64, Int64, String, String, Object>, IEnumerable<UInt64>> Func = null)
        {
            this.PropertyGraph    = PropertyGraph;
            this.VertexFilter     = VertexFilter;
            this.EdgeFilter       = EdgeFilter;
            this.Func             = Func;
            this._MatrixListGraph = new List<List<UInt64>>();

            PropertyGraph.Vertices(VertexFilter).ForEach(v =>
            {

                var _List = new List<UInt64>();// { v.Id };
                _List.AddRange(Func(v));
                _MatrixListGraph.Add(_List);

            });

            PropertyGraph.OnVertexAddition.OnNotification += (g, v) => AddVertex(v);
            PropertyGraph.OnEdgeAddition.OnNotification   += (g, e) => AddEdge(e);
        }
Пример #2
0
        public VertexEdge_MatrixListGraph(IGenericPropertyGraph<UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object> PropertyGraph,

                                          VertexFilter         <UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object> VertexFilter = null,

                                          EdgeFilter           <UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object,
                                                                UInt64, Int64, String, String, Object> EdgeFilter = null)

            : base(PropertyGraph,
                   VertexFilter,
                   EdgeFilter,
                   v => from e in v.OutEdges(EdgeFilter) select e.Id)

        {
        }