Commit c4f23b37 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

init blc_array with tsv file. Not yet working.

parent ec94a37e
......@@ -120,6 +120,8 @@ typedef struct blc_array
void init_with_blc_file(char const *filename);
/**Update the content of the memory with the content of the blc file. The blc_array has to be properly defined and allocated before. .blc format is a specific format, whre de first line is the properties of the blc_array and them it is raw binary memory. It may be a problem with endianness */
void update_with_blc_file(char const *filename);
void def_with_tsv_file(char const *filename);
/**Same as update_with_blc_file but this reas .tsv, tab separated values (i.e. 0.75 0.33 0.55 ). Typically used with excel and similar. You have to care yourself to define and allocate an appropriate blc_array.*/
void update_with_tsv_file(char const *filename);
This diff is collapsed.
......@@ -56,11 +56,11 @@ int main(int argc, char **argv){
//We save the value as a blc file that we will be able to reread
matrix.save_tsv_file("bl/blc_core/t_array/array.tsv"); //Bigger but readable in text mode or within spreadsheet, excel, matlab
matrix.save_tsv_file("blibs/blc_core/t_array/array.tsv"); //Bigger but readable in text mode or within spreadsheet, excel, matlab
//We reload the matrix which should be identical
//we compare the content of the two matrixes
if (memcmp(,, matrix.size)!=0) EXIT_ON_ARRAY_ERROR(&matrix,"The content of the saved and reloaded matrix are not the same");
......@@ -68,7 +68,7 @@ int main(int argc, char **argv){
fprintf(stderr, "\nWe load an array of intensities and display the values\n\n");
//Load the array
//Display the array as a array of decimals)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment