#ifndef LINKCELL_H
#define LINKCELL_H
#pragma once
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
typedef struct lc_cell {
double ax;
double ay;
double az;
double bx;
double by;
double bz;
double cx;
double cy;
double cz;
double ox;
double oy;
double oz;
} lc_cell;
#ifdef __cplusplus
extern "C" {
#endif
int lc_knearest(const double *xyz,
size_t n,
const struct lc_cell *simbox,
size_t k,
const int *mask,
double cell_hint,
int *out_nn);
int lc_knearest_d2(const double *xyz,
size_t n,
const struct lc_cell *simbox,
size_t k,
const int *mask,
double cell_hint,
int *out_nn,
double *out_d2);
int lc_knearest_many(const double *xyz,
size_t n,
size_t n_frames,
const struct lc_cell *simbox,
size_t k,
const int *mask,
double cell_hint,
int *out_nn,
double *out_d2);
const char *lc_last_error(void);
const char *lc_version(void);
#ifdef __cplusplus
} #endif
#endif
#ifndef LINKCELL_LC_CELL_ORTHO_H
#define LINKCELL_LC_CELL_ORTHO_H
#ifdef __cplusplus
extern "C" {
#endif
static inline lc_cell lc_cell_ortho(double lx, double ly, double lz) {
lc_cell c;
c.ax = lx;
c.ay = 0.0;
c.az = 0.0;
c.bx = 0.0;
c.by = ly;
c.bz = 0.0;
c.cx = 0.0;
c.cy = 0.0;
c.cz = lz;
c.ox = 0.0;
c.oy = 0.0;
c.oz = 0.0;
return c;
}
#ifdef __cplusplus
}
#endif
#endif