Skip to content

Consider dropping Vertex ID #131

@clue

Description

@clue

Some thoughts:

  • Ticket Use Attributes for all mathematical properties (weight, balance etc.) #114 will remove all mathematical properties from the Vertex and Edge classes, such as weight, balance etc. and will use general purpose Attributes instead.
  • This means that the Vertex ID will be the only property remaining that is not being stored in the Attributes. Arguably, this might cause confusion and limits how this library can be used.
  • Also, the way the Vertex ID is currently implemented, requires it to be unique within the whole graph. Among others, this means that we can not create an exact clone of the vertex within the same graph (see Support native cloning of Base objects #58).
  • The Vertex ID is often used as an index for arrays / maps. Because of this, it can only be set during construction time and can not be changed later on.

As an alternative, we should consider if dropping the Vertex ID altogether could be an option.

  • Most use cases can probably store an arbitrary identifier (or any number thereof) in the Attributes instead
  • I'm not sure if enforcing a unique key constraint is actually needed anywhere and even if so: is this necessarily part of this library?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions