public IDataContainerKVInstance <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); IDataContainerKVInstance <V, E, TV, TE> instanceT = new IDataContainerKVInstanceImpl <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 IDataContainerKVInstanceImpl <V, E, int, IEdgeInstance <V, int> > (v.Id, e, Rank); return(instance); }
public object Clone() { IDataContainerKVInstanceImpl <V, E, TV, TE> clone = new IDataContainerKVInstanceImpl <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 <KeyValuePair <TV, float> > > (dataSet); return((IDataContainerKVInstance <V, E, TV, TE>)clone); }