public object Clone()
            {
                IDataContainerVInstance <V, E, TV, TE> c     = (IDataContainerVInstance <V, E, TV, TE>) this.Container.Clone();
                IGraphHelperVImpl <V, E, TV, TE>       clone = new IGraphHelperVImpl <V, E, TV, TE> (c);

                clone.count_edges = this.count_edges;
                return(clone);
            }
        public IDirectedGraphInstance <V, E, int, IEdgeInstance <V, int> > newInstance(int size)
        {
            IDataContainerVInstance <V, E, int, IEdgeInstance <V, int> > dc = DataContainer.DataContainerVInstance;

            dc.newDataSet(size);
            IGraphHelperV <V, E, int, IEdgeInstance <V, int> > h = new IGraphHelperVImpl <V, E, int, IEdgeInstance <V, int> >(dc);

            this.graphInstanceT = new GraphInstanceImpl <V, E, int, IEdgeInstance <V, int> > (h);
            return((IDirectedGraphInstance <V, E, int, IEdgeInstance <V, int> >) this.graphInstanceT);
        }
        public IDirectedGraphInstance <V, E, TV, TE> newInstanceT <TV, TE> (TE e, int size)  where TE : IEdgeInstance <V, TV>
        {
            IDataContainerVInstance <V, E, TV, TE> dc = DataContainer.InstanceTFactory <TV, TE>(e);

            dc.newDataSet(size);
            IGraphHelperV <V, E, TV, TE> h = new IGraphHelperVImpl <V, E, TV, TE>(dc);

            this.graphInstanceT = new GraphInstanceImpl <V, E, TV, TE> (h);
            return((IDirectedGraphInstance <V, E, TV, TE>) this.graphInstanceT);
        }
Ejemplo n.º 4
0
 public override bool Equals(object obj)
 {
     if (typeof(IDataContainerVInstance <V, E, TV, TE>).IsAssignableFrom(obj.GetType()))
     {
         IDataContainerVInstance <V, E, TV, TE> o = (IDataContainerVInstance <V, E, TV, TE>)obj;
         if (o.RankPartition == this.RankPartition)
         {
             return(true);
         }
     }
     return(false);
 }
 public IGraphHelperVImpl(IDataContainerVInstance <V, E, TV, TE> c)
 {
     container = c;
 }