## hkl-source-private

hkl-source-private

## Functions

HklSource * | hkl_source_dup ()
void | hkl_source_free ()
int | hkl_source_init ()
int | hkl_source_cmp ()
void | hkl_source_compute_ki ()
double | hkl_source_get_wavelength ()
void | hkl_source_fprintf ()

## Types and Values

#define | HKL_SOURCE_DEFAULT_WAVE_LENGTH
struct | HklSource

## Description

## Functions

### hkl_source_dup ()

    HklSource *
    hkl_source_dup (const HklSource *self);

copy constructor TODO test

#### Parameters

self | the Hklsource to copy |

### hkl_source_free ()

    void
    hkl_source_free (HklSource *self);

destructor TODO: test

#### Parameters

self | the Hklsource to delete |

### hkl_source_init ()

    int
    hkl_source_init (HklSource *self,
                     double wave_length,
                     double x,
                     double y,
                     double z);

initialize the HklSource

#### Parameters

self | the Hklsource to initialize |
wave_length | the wave length to set |
x | x coordinates of the ki vector |
y | y coordinates of the ki vector |
z | z coordinates of the ki vector |

#### Returns

HKL_SUCCESS if everythongs goes fine, HKL_FAIL otherwise

### hkl_source_cmp ()

    int
    hkl_source_cmp (HklSource const *self,
                    HklSource const *s);

compare two sources

[skip]

#### Parameters

self | 1st Hklsource |
s | 2nd Hklsource |

### hkl_source_compute_ki ()

    void
    hkl_source_compute_ki (HklSource const *self,
                           HklVector *ki);

compute the ki hkl_vector

[skip]

#### Parameters

ki | . | [out caller-allocates]

### hkl_source_get_wavelength ()

    double
    hkl_source_get_wavelength (HklSource const *self);

get the wave_length

[skip]

#### Returns

the wave_length

### hkl_source_fprintf ()

    void
    hkl_source_fprintf (FILE *f,
                        HklSource const *self);

printf the source

[skip]

## Types and Values

### HKL_SOURCE_DEFAULT_WAVE_LENGTH

    #define HKL_SOURCE_DEFAULT_WAVE_LENGTH (1.54)

### struct HklSource

    struct HklSource {
    	double wave_length;
    	HklVector direction;
    };