}
func (e *encoder) Add(v Vertex) {
+ if e == nil {
+ return
+ }
e.Encode(marshalTransform{
Type: typeTransform,
AddVertex: newMarshalVertex(v),
// Remove records the removal of Vertex v.
func (e *encoder) Remove(v Vertex) {
+ if e == nil {
+ return
+ }
e.Encode(marshalTransform{
Type: typeTransform,
RemoveVertex: newMarshalVertex(v),
}
func (e *encoder) Connect(edge Edge) {
+ if e == nil {
+ return
+ }
e.Encode(marshalTransform{
Type: typeTransform,
AddEdge: newMarshalEdge(edge),
}
func (e *encoder) RemoveEdge(edge Edge) {
+ if e == nil {
+ return
+ }
e.Encode(marshalTransform{
Type: typeTransform,
RemoveEdge: newMarshalEdge(edge),