(linenum→info "unix/slp.c:2238")

anthy/9100e/anthy/matrix.h

    1: /* 疎行列を扱うためのコード */
    2: #ifndef _matrix_h_included_
    3: #define _matrix_h_included_
    4: 
    5: struct matrix_image {
    6:   /* number of 'int elements */
    7:   int size;
    8:   /* array of 'int */
    9:   int *image;
   10: };
   11: 
   12: struct sparse_matrix;
   13: struct sparse_array;
   14: 
   15: /* 行列を構成するAPI */
   16: struct sparse_matrix *anthy_sparse_matrix_new(void);
   17: void anthy_sparse_matrix_set(struct sparse_matrix *m, int row, int column,
   18:                              int value, void *ptr);
   19: int anthy_sparse_matrix_get_int(struct sparse_matrix *m, int row, int column);
   20: void anthy_sparse_matrix_make_matrix(struct sparse_matrix *m);
   21: /* 行列イメージを構築するAPI(配列はhost byte order) */
   22: struct matrix_image *anthy_matrix_image_new(struct sparse_matrix *s);
   23: /* 行列イメージにアクセスするAPI(配列はnetwork byte order) */
   24: int anthy_matrix_image_peek(int *im, int row, int col);
   25: 
   26: #endif
Syntax (Markdown)