Skip to content

Remove type piracy #53

@ryanlevy

Description

@ryanlevy

in src/utils.jl we have some type piracy

function ITensors.inds(s::IndsNetwork, v)
return s[v]
end
function ITensors.inds(s::IndsNetwork, verts::Vector)
return reduce(vcat, [inds(s, v) for v in verts])
end
function ITensors.inds(s::IndsNetwork)
return inds(s, collect(vertices(s)))
end
function base(s::IndsNetwork)
indices = inds(s)
dims = dim.(indices)
@assert all(d -> d == first(dims), dims)
return first(dims)
end

We should probably remove these and also be more careful, thinking toward multiple base within the index maps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions