Skip to content

Norm of a state #5

@zhanglw0521

Description

@zhanglw0521

I am a little bit lost about the norm of a DecoratedParticle.

My memory was that an AbstractState should not have a norm, but now it has one which seems to be a weighted norm of all its elements (cf here).

For instance, if we have two States
R1 = State(rr = SVector{3}([1,0,0]), be = false)
and
R2 = State(rr = SVector{3}([1,0,0]), be = true),
those bool values are also counted when we evaluate norm(R) (i.e., they return 1 and $\sqrt2$ respectively, which means that Bools are viewed as 0 and 1 in this case). If we have some fields like charge, then the norm of this State also counts the charges. This is a little bit strange to me...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions