You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current MetaGraph constructor requires the user to explicitly specify the types of the metadata via the arguments Label, VertexMeta, and EdgeMeta. That seems a little unusual to me. It's much more common for constructors to determine the values of type parameters based on the data passed to the constructor, e.g.
which corresponds to how one normally creates a typed but empty object. E.g., for a typed but empty dictionary, you would use this:
Dict{Symbol, String}()
Or for a typed but empty vector:
Vector{Int}()
...although for arrays we have the sugar Int[].
The text was updated successfully, but these errors were encountered:
CameronBieganek
changed the title
Add constructors that infer the meta data types from the data values provided to constructor
Add constructors that infer the metadata types from the data values provided to constructor
May 10, 2020
Uh oh!
There was an error while loading. Please reload this page.
The current
MetaGraph
constructor requires the user to explicitly specify the types of the metadata via the argumentsLabel
,VertexMeta
, andEdgeMeta
. That seems a little unusual to me. It's much more common for constructors to determine the values of type parameters based on the data passed to the constructor, e.g.It would be nice if there were some constructors like the following that infer the type parameters from the data:
The fallback for creating a typed but empty graph would be something like the following:
which corresponds to how one normally creates a typed but empty object. E.g., for a typed but empty dictionary, you would use this:
Or for a typed but empty vector:
...although for arrays we have the sugar
Int[]
.The text was updated successfully, but these errors were encountered: