Types and Values
HKL_DEPRECATED
# define HKL_DEPRECATED __attribute__((__deprecated__))
HKL_TINY
#define HKL_TINY 1e-7
HKL_EPSILON
#define HKL_EPSILON 1e-6
HKL_DEGTORAD
#define HKL_DEGTORAD (M_PI/180.)
HKL_RADTODEG
#define HKL_RADTODEG (180./M_PI)
HKL_VERSION
#define HKL_VERSION "5.1.3"
HKL_TAU
#define HKL_TAU (2. * M_PI)
HKLAPI
# define HKLAPI __attribute__ ((visibility("default")))
HKL_WARN_UNUSED_RESULT
# define HKL_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
struct HklVector
struct HklVector {
double data[3];
};
HKL_VECTOR_X
#define HKL_VECTOR_X {{1, 0, 0}}
HKL_VECTOR_Y
#define HKL_VECTOR_Y {{0, 1, 0}}
HKL_VECTOR_Z
#define HKL_VECTOR_Z {{0, 0, 1}}
struct HklQuaternion
struct HklQuaternion {
double data[4];
};
darray_string
typedef darray(const char *) darray_string;
struct HklUnitDimension
struct HklUnitDimension {
int l; /* Length */
int m; /* Mass */
int t; /* Time */
int i; /* Electric current */
int th; /* Thermodynamic temperature */
int n; /* Amount of substance */
int j; /* Luminous intensity */
};
HklDPlaneAngle
#define HklDPlaneAngle {0, 0, 0, 0, 0, 0, 0}
HklDLength
#define HklDLength {1, 0, 0, 0, 0, 0, 0}
struct HklUnit
struct HklUnit {
HklUnitDimension dimension;
double factor;
char const *name;
char const *repr;
};
hkl_unit_angle_deg
extern const HklUnit hkl_unit_angle_deg;
hkl_unit_angle_rad
extern const HklUnit hkl_unit_angle_rad;
hkl_unit_length_nm
extern const HklUnit hkl_unit_length_nm;
hkl_unit_angle_mrad
extern const HklUnit hkl_unit_angle_mrad;
hkl_unit_length_mm
extern const HklUnit hkl_unit_length_mm;
hkl_unit_length_meter
extern const HklUnit hkl_unit_length_meter;
darray_engine
typedef darray(HklEngine *) darray_engine;
enum HklEngineCapabilities
enum HklEngineAxisNamesGet
enum HklEngineDependencies
HklDetector
typedef struct {
size_t idx;
HklHolder const *holder;
} HklDetector;
HklEngine
typedef struct {
const HklEngineInfo *info;
const HklEngineOperations *ops;
HklGeometry *geometry;
HklDetector *detector;
HklSample *sample;
HklMode *mode; /* not owned */
HklEngineList *engines; /* not owned */
darray_parameter axes;
darray_parameter pseudo_axes;
darray_string pseudo_axis_names;
darray_mode modes;
darray_string mode_names;
} HklEngine;
HklEngineList
typedef struct {
_darray(HklEngine *); /* must be the first memeber */
const HklEngineListInfo *info;
const HklEngineListOperations *ops;
HklGeometryList *geometries;
HklGeometry *geometry;
HklDetector *detector;
HklSample *sample;
darray_parameter pseudo_axes;
darray_parameter parameters;
darray_string parameters_names;
} HklEngineList;
HklFactory
typedef struct {
const char *name;
const char *description;
const darray_string axes;
HklFactoryGeometryFunction create_new_geometry;
HklFactoryEngineListFunction create_new_engine_list;
} HklFactory;
HklGeometry
typedef struct {
const HklFactory *factory;
HklSource source;
darray_parameter axes;
darray_holder holders;
const HklGeometryOperations *ops;
} HklGeometry;
HklGeometryList
typedef struct {
HklGeometryListMultiplyFunction multiply;
struct list_head items;
size_t n_items;
} HklGeometryList;
HklGeometryListItem
typedef struct {
struct list_node list;
HklGeometry *geometry;
} HklGeometryListItem;
HklLattice
typedef struct {
HklParameter *a;
HklParameter *b;
HklParameter *c;
HklParameter *alpha;
HklParameter *beta;
HklParameter *gamma;
HklParameter *volume;
} HklLattice;
HklMatrix
typedef struct {
double data[3][3];
} HklMatrix;
HklParameter
typedef struct {
const char *name;
const char *description;
HklInterval range;
double _value;
const HklUnit *unit;
const HklUnit *punit;
int fit;
int changed;
const HklParameterOperations *ops;
HklParameterType type;
} HklParameter;
HklSample
typedef struct {
char *name;
HklLattice *lattice;
HklMatrix U;
HklMatrix UB;
HklParameter *ux;
HklParameter *uy;
HklParameter *uz;
struct list_head reflections;
size_t n_reflections;
} HklSample;
HklSampleReflection
typedef struct {
HklGeometry *geometry;
HklDetector *detector;
HklSample *sample;
HklVector hkl;
HklVector _hkl;
int flag;
struct list_node list;
} HklSampleReflection;