-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInside.H
34 lines (30 loc) · 913 Bytes
/
Inside.H
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
/****************************************************************
Inside.H
Copyright (C)2013 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_Inside_H
#define INCL_Inside_H
#include <iostream>
#include "BOOM/TriangMatrix.H"
#include "BOOM/Sequence.H"
#include "BinaryProductions.H"
using namespace std;
using namespace BOOM;
typedef Array1D<float> Cell; // indexed by nonterminal ID
class Inside {
TriangMatrix<Cell> M;
Sequence &S;
BinaryProductions &productions;
int numNonterminals;
int numProds;
int L;
void initDiagonal();
void fillMatrix();
public:
Inside(Sequence &,BinaryProductions &);
float likelihood() const;
float operator()(int i,int j,int nonterminal) const;
};
#endif