|
seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
|
Cutoff, mutual, and k-nearest graphs as CSR. More...
Functions | |
| SEAMS_API seams_status | seams_neighbours_build (seams_system *sys, double cutoff, int type, int graph, seams_neighbours **out) |
| Build a cutoff or mutual neighbour list. | |
| SEAMS_API void | seams_neighbours_destroy (seams_neighbours *nb) |
| Free a neighbour list. | |
| SEAMS_API int | seams_neighbours_count (const seams_neighbours *nb) |
| Number of neighbour rows, as an int. | |
| SEAMS_API seams_status | seams_neighbours_csr (const seams_neighbours *nb, const int **offsets, int *n_offsets, const int **cols, int *nnz) |
| Borrow the neighbour list as CSR. | |
| SEAMS_API seams_status | seams_neighbours_copy (const seams_neighbours *nb, int *offsets, size_t offsets_cap, size_t *n_offsets, int *cols, size_t cols_cap, size_t *nnz) |
| Copy the neighbour CSR into caller buffers. | |
Cutoff, mutual, and k-nearest graphs as CSR.
| SEAMS_API seams_status seams_neighbours_build | ( | seams_system * | sys, |
| double | cutoff, | ||
| int | type, | ||
| int | graph, | ||
| seams_neighbours ** | out ) |
Build a cutoff or mutual neighbour list.
| sys | Frame handle that already holds a frame. |
| cutoff | Positive finite cutoff, Angstrom. The mutual graph keeps the four nearest neighbours inside cutoff + 1.5. |
| type | Species to keep. Zero and negative keep every atom. |
| graph | SEAMS_GRAPH_CUTOFF or SEAMS_GRAPH_MUTUAL. SEAMS_GRAPH_SEEDED is rejected here. |
| out | Receives a new handle. On failure *out is NULL. |
| SEAMS_API seams_status seams_neighbours_copy | ( | const seams_neighbours * | nb, |
| int * | offsets, | ||
| size_t | offsets_cap, | ||
| size_t * | n_offsets, | ||
| int * | cols, | ||
| size_t | cols_cap, | ||
| size_t * | nnz ) |
Copy the neighbour CSR into caller buffers.
| nb | Neighbour handle. |
| offsets | Caller buffer of offsets_cap ints, or NULL to query. |
| offsets_cap | Capacity of offsets. Ignored when offsets is NULL. |
| n_offsets | Receives the required offset count (n + 1). |
| cols | Caller buffer of cols_cap ints, or NULL to query. |
| cols_cap | Capacity of cols. Ignored when cols is NULL. |
| nnz | Receives the required column count. |
| SEAMS_API int seams_neighbours_count | ( | const seams_neighbours * | nb | ) |
Number of neighbour rows, as an int.
ABI 1 query. seams_neighbours_nrows() reports errors.
| nb | Neighbour handle, or NULL. |
| SEAMS_API seams_status seams_neighbours_csr | ( | const seams_neighbours * | nb, |
| const int ** | offsets, | ||
| int * | n_offsets, | ||
| const int ** | cols, | ||
| int * | nnz ) |
Borrow the neighbour list as CSR.
Offsets has n + 1 entries. Columns omit the self entry.
| nb | Neighbour handle. |
| offsets | Receives the offset pointer. |
| n_offsets | Receives the offset count, n + 1. |
| cols | Receives the column pointer. May be NULL when the list has no pairs; *nnz is then 0. |
| nnz | Receives the column count. |
| SEAMS_API void seams_neighbours_destroy | ( | seams_neighbours * | nb | ) |
Free a neighbour list.
| nb | Handle from seams_neighbours_build() or seams_neighbours_knn(), or NULL. NULL is ignored. |