Skip to content

Add sample_edges and sample_nodes #59

@rogerpearce

Description

@rogerpearce

After #56 is merged. Create a PR off master to do this.

Goal is to add ability to uniformly random sample from a where clause's subgraph k nodes or edges. Key difference from select_* is that it uniformly samples.

To do this we must first compute the full where-subgraph, then compute a prefix_sum across the distribution of processors, then sample the k indices to be marked for returning. Assume k is rather small, under 1000. k should be a required parameter without a default.

Note that YGM already has support for prefix_sum:
https://github.com/llnl/ygm/blob/master/include/ygm/detail/collective.hpp#L25

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions