public IDataContainerEInstance <V, E, TV, TE> InstanceTFactory <TV, TE> (TE e) where TE : IEdgeInstance <V, TV>
        {
            TE ei = (TE)this.EdgeFactory.InstanceTFactory <TV> (e.Source, e.Target);           //,e.Weight);
            IDataContainerEInstance <V, E, TV, TE> instanceT = new IDataContainerEInstanceImpl <V, E, TV, TE> (ei.Source, ei, Rank);

            return(instanceT);
        }
        public object newInstance()
        {
            IVertexInstance        v = (IVertexInstance)this.Vertex.newInstance();
            IEdgeInstance <V, int> e = (IEdgeInstance <V, int>) this.EdgeFactory.newInstance();

            instance = new IDataContainerEInstanceImpl <V, E, int, IEdgeInstance <V, int> > (v.Id, e, Rank);
            return(instance);
        }
        public object Clone()
        {
            IDataContainerEInstanceImpl <V, E, TV, TE> clone = new IDataContainerEInstanceImpl <V, E, TV, TE> ();

            Type[] types = this.GetType().GenericTypeArguments;
            if (typeof(ICloneable).IsAssignableFrom(types [2]))
            {
                clone.Vertex = (TV)((ICloneable)vertex).Clone();
            }
            else
            {
                clone.Vertex = vertex;
            }
            clone.EdgeFactory           = (TE)edgeFactory.Clone();
            clone.RankPartition         = rankPartition;
            clone.AllowingLoops         = _allowingLoops;
            clone.AllowingMultipleEdges = _allowingMultipleEdges;
            clone.DataSet = new Dictionary <TV, IEdgeContainer <TE> > (dataSet);
            return((IDataContainerEInstance <V, E, TV, TE>)clone);
        }