-
Notifications
You must be signed in to change notification settings - Fork 191
Expand file tree
/
Copy pathpath.h
More file actions
38 lines (31 loc) · 694 Bytes
/
path.h
File metadata and controls
38 lines (31 loc) · 694 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
//
// CRF++ -- Yet Another CRF toolkit
//
// $Id: path.h 1595 2007-02-24 10:18:32Z taku $;
//
// Copyright(C) 2005-2007 Taku Kudo <taku@chasen.org>
//
#ifndef CRFPP_PATH_H_
#define CRFPP_PATH_H_
#include <vector>
#include "node.h"
namespace CRFPP {
struct Node;
struct Path {
Node *rnode;
Node *lnode;
const int *fvector;
double cost;
Path() : rnode(0), lnode(0), fvector(0), cost(0.0) {}
// for CRF
void calcExpectation(double *expected, double, size_t) const;
void add(Node *_lnode, Node *_rnode) ;
void clear() {
rnode = lnode = 0;
fvector = 0;
cost = 0.0;
}
};
typedef std::vector<Path*>::const_iterator const_Path_iterator;
}
#endif