#ifndef CELL_H
#define	CELL_H

#include <stdio.h>
#include <stdlib.h>
#include "element.h"
#include "cell_data.h"
#include "matrix_data.h"

#define CELL_DEBUG

cell * cell_alloc (unsigned int i, unsigned int j);
void cell_throw_away (cell * pc);
void cell_free (cell * pc);
void cell_free_element (cell *pc, unsigned int i, unsigned int j);
cell * cell_clone (cell * pc);

void cell_set (cell * pc, unsigned int i, unsigned int j, element * el);
element * cell_get (cell * pc, unsigned int i, unsigned int j);
unsigned int cell_size_m (cell * pc);
unsigned int cell_size_n (cell * pc);

cell *cell_cat (cell *A, cell *B, unsigned int how);
cell *cell_cat_list(list * L, unsigned int how);
#define CELL_CAT_VERTICALLY 0
#define CELL_CAT_HORIZONTALLY 1

void cell_print_info (cell * pc);
void cell_print_info_indent (cell * pc, unsigned int indent);
void cell_print (cell *pc);
void cell_print_indent (cell * pc, unsigned int indent);

int cell_not_null (cell *pc);


#endif