Skip to content

Systematization of returned types in .*intensity methods #72

@JoseKling

Description

@JoseKling

Currently the return types of the methods related to intensity do not follow any explicit logic.

As an example, If I have a process pp = PoissonProcess(Float32(1), Uniform()), then ground_intensity(pp) = 10f0, but intensity(pp, 0.5) = 1.0. Not too bad, but makes it hard to reason about types, especially considering other methods may include marks or other user input.

What are sensible return types for these methods? I think the process should be the only argument to determine the type of the intensity, so using pp as in the example above, the methods intensity, ground_intensity and integrated_ground_intensity should all return a Float32.

The only caveat is that, in general, the intensity is a Float, even if the process parameters are Ints. So, if pp = PoissonProcess(T(1), Uniform()), where T<:Real, then the return type of the three methods above should be float(T).

Thoughts?

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