aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-22 14:59:05 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:20 +0100
commit656abb22b20cf9a4a47f6062e80ffa9553d38c0f (patch)
treec5079ff1f9af0bed2ed86ff0b0594daa9e63ceff /src/reflist.c
parent407a74d5f4ad651170707ae762a63c6cbec47205 (diff)
partialator: Save reflection list
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/reflist.c b/src/reflist.c
index a81c738e..30d9f696 100644
--- a/src/reflist.c
+++ b/src/reflist.c
@@ -133,7 +133,7 @@ void reflist_free(RefList *list)
/********************************** Search ************************************/
/* Return the first reflection in 'list' with the given indices, or NULL */
-Reflection *find_refl(RefList *list, INDICES)
+Reflection *find_refl(const RefList *list, INDICES)
{
unsigned int search = SERIAL(h, k, l);
Reflection *refl = list->head->child[0];
@@ -185,20 +185,21 @@ Reflection *next_found_refl(Reflection *refl)
/********************************** Getters ***********************************/
-double get_excitation_error(Reflection *refl)
+double get_excitation_error(const Reflection *refl)
{
return refl->data.excitation_error;
}
-void get_detector_pos(Reflection *refl, double *x, double *y)
+void get_detector_pos(const Reflection *refl, double *x, double *y)
{
*x = refl->data.x;
*y = refl->data.y;
}
-void get_indices(Reflection *refl, signed int *h, signed int *k, signed int *l)
+void get_indices(const Reflection *refl,
+ signed int *h, signed int *k, signed int *l)
{
*h = refl->data.h;
*k = refl->data.k;
@@ -206,19 +207,19 @@ void get_indices(Reflection *refl, signed int *h, signed int *k, signed int *l)
}
-double get_partiality(Reflection *refl)
+double get_partiality(const Reflection *refl)
{
return refl->data.p;
}
-double get_intensity(Reflection *refl)
+double get_intensity(const Reflection *refl)
{
return refl->data.intensity;
}
-void get_partial(Reflection *refl, double *r1, double *r2, double *p,
+void get_partial(const Reflection *refl, double *r1, double *r2, double *p,
int *clamp_low, int *clamp_high)
{
*r1 = refl->data.r1;
@@ -229,31 +230,31 @@ void get_partial(Reflection *refl, double *r1, double *r2, double *p,
}
-int get_scalable(Reflection *refl)
+int get_scalable(const Reflection *refl)
{
return refl->data.scalable;
}
-int get_redundancy(Reflection *refl)
+int get_redundancy(const Reflection *refl)
{
return refl->data.redundancy;
}
-double get_sum_squared_dev(Reflection *refl)
+double get_sum_squared_dev(const Reflection *refl)
{
return refl->data.sum_squared_dev;
}
-double get_esd_intensity(Reflection *refl)
+double get_esd_intensity(const Reflection *refl)
{
return refl->data.esd_i;
}
-double get_phase(Reflection *refl)
+double get_phase(const Reflection *refl)
{
return refl->data.phase;
}
@@ -261,7 +262,7 @@ double get_phase(Reflection *refl)
/********************************** Setters ***********************************/
-void copy_data(Reflection *to, Reflection *from)
+void copy_data(Reflection *to, const Reflection *from)
{
memcpy(&to->data, &from->data, sizeof(struct _refldata));
}