Added contains(triple) method to graph