Welcome to mirror list, hosted at ThFree Co, Russian Federation.

point.h « cmert-0.5 « training « scripts - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7cb85685a9eb09d9186da7c3cd8ef76793dce820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// $Id: point.h 1307 2007-03-14 22:22:36Z hieuhoang1972 $
#ifndef POINT_H
#define POINT_H

typedef struct {
  float *weights;
  int has_score;
  float score;
} point_t;

extern int dim;

point_t *new_point();
void point_set_score(point_t *point, float score);
void point_delete(point_t *point);
point_t *point_copy(point_t *point);
point_t *random_point(point_t *min, point_t *max);
float point_dotproduct(point_t *point, float *y);
void point_multiplyby(point_t *point, float k);
void point_normalize(point_t *point);
void point_addto(point_t *point1, point_t *point2);
#include <stdio.h>
point_t *read_point(FILE *fp);
void point_print(point_t *point, FILE *fp, int with_score);

#endif