int ICompoundGraph <TVertex, TEdge> .GetChildrenCount(TVertex vertex) { ICompoundGraph <TVertex, TEdge> ithis = this; Contract.Requires(ithis.ContainsVertex(vertex)); Contract.Ensures(Contract.Result <int>() >= 0); return(default(int)); }
IEnumerable <TVertex> ICompoundGraph <TVertex, TEdge> .GetChildrenVertices(TVertex vertex) { ICompoundGraph <TVertex, TEdge> ithis = this; Contract.Requires(!vertex.Equals(default(TVertex))); Contract.Requires(ithis.ContainsVertex(vertex)); return(new List <TVertex>()); }
bool ICompoundGraph <TVertex, TEdge> .IsChildVertex(TVertex vertex) { ICompoundGraph <TVertex, TEdge> ithis = this; Contract.Requires(!vertex.Equals(default(TVertex))); Contract.Requires(ithis.ContainsVertex(vertex)); return(default(bool)); }
bool ICompoundGraph <TVertex, TEdge> .AddChildVertex(TVertex parent, TVertex child) { ICompoundGraph <TVertex, TEdge> ithis = this; Contract.Requires(!parent.Equals(default(TVertex))); Contract.Requires(ithis.ContainsVertex(parent)); return(default(bool)); }
int ICompoundGraph <TVertex, TEdge> .AddChildVertexRange(TVertex parent, IEnumerable <TVertex> children) { ICompoundGraph <TVertex, TEdge> ithis = this; Contract.Requires(!parent.Equals(default(TVertex))); Contract.Requires(ithis.ContainsVertex(parent)); Contract.Ensures(Contract.Result <int>() >= 0); return(default(int)); }
TVertex ICompoundGraph <TVertex, TEdge> .GetParent(TVertex vertex) { ICompoundGraph <TVertex, TEdge> ithis = this; Contract.Requires(!vertex.Equals(default(TVertex))); Contract.Requires(ithis.ContainsVertex(vertex)); //TODO this is a bug in the MS Contract, i think -- solve it //Contract.Ensures( Contract.Result<TVertex>().Equals( default( TVertex ) ) || ithis.ContainsVertex( Contract.Result<TVertex>() ) ); return(default(TVertex)); }