示例#1
0
        public IEdgeInstance <V, T> InstanceTFactory <T> (T s, T t, float w)
        {
            //IKVPairInstance<V,V> kv = (IKVPairInstance<V,V>)Vertices.newInstance ();
            IEdgeWeightedInstance <V, T> instanceT = new IEdgeWeightedInstanceImpl <V, T> (s, t, w);

            return(instanceT);
        }
示例#2
0
        public object Clone()
        {
            IEdgeWeightedInstance <V, TV> clone;

            Type[] types = this.GetType().GenericTypeArguments;
            if (typeof(ICloneable).IsAssignableFrom(types [1]))
            {
                return(new IEdgeWeightedInstanceImpl <V, TV> ((TV)((ICloneable)this.Source).Clone(), (TV)((ICloneable)this.Target).Clone(), 1.0f));
            }
            try { return(this.MemberwiseClone()); } catch (NotSupportedException e) { }
            clone = new IEdgeWeightedInstanceImpl <V, TV> (source, target, 1.0f);
            return(clone);
        }