GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRBreakMatrix.h
1 #ifndef GRBreakMatrix_H
2 #define GRBreakMatrix_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2002-2017 Grame
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 #include "kf_ivect.h" // required
19 
20 //#include "kf_list.h"
21 //#include "kf_ilist.h"
22 
23 template <class T> class KF_IPointerList;
24 template <class T> class KF_List;
25 
26 class GRBreakMatrix;
27 
28 
29 typedef KF_List<int> intlist;
30 
39 {
40 public:
41 
42  friend class GRBreakMatrix;
43 
44  GRPenaltyEntry(float fpenalty,
45  int pindex1,int pindex2);
46 
47 
48  // this constructs a new PenaltyEntry. This
49  // is just made up from two previous entries.
50  // the
51  // and the combination of two previous breaklists
53  GRPenaltyEntry *ptpe2);
54 
55 
56  intlist * GetBreakList(intlist * mybreaklist);
57 
58 
59 protected:
60  // this is the penalty-value
61  float penalty;
62  // this is a pointer to
63  union
64  {
66  int index;
67  } entry1, entry2;
68 
70 };
71 
75 
76 
81 {
82 public:
83  GRBreakMatrix();
84 
85  pentrylist * GetAt(int row,int column);
86  void AddAt(int row,int column,GRPenaltyEntry * pe);
87  void ClearAt(int row,int column);
88 
89 protected:
90 
92 };
93 
94 #endif
GRPenaltyEntry
Describes an entry in the Sparse-Break-Matrix. We have a (sorted) list of individual entries,...
Definition: GRBreakMatrix.h:38
GRPenaltyEntry::entry2
union GRPenaltyEntry::@16 entry2
GRBreakMatrix::GRBreakMatrix
GRBreakMatrix()
GRPenaltyEntry::index
int index
Definition: GRBreakMatrix.h:66
KF_IPointerList
Definition: ARMusicalVoiceState.h:33
GRPenaltyEntry::ispointerentry
int ispointerentry
Definition: GRBreakMatrix.h:69
GRPenaltyEntry::entry1
union GRPenaltyEntry::@16 entry1
GRPenaltyEntry::GRPenaltyEntry
GRPenaltyEntry(float fpenalty, int pindex1, int pindex2)
GRPenaltyEntry::pe
GRPenaltyEntry * pe
Definition: GRBreakMatrix.h:65
GRBreakMatrix::AddAt
void AddAt(int row, int column, GRPenaltyEntry *pe)
KF_IVector
Definition: GRPossibleBreakState.h:20
GRPenaltyEntry::penalty
float penalty
Definition: GRBreakMatrix.h:61
GRBreakMatrix::ClearAt
void ClearAt(int row, int column)
GRBreakMatrix::rows
ppentryvector rows
Definition: GRBreakMatrix.h:91
GRBreakMatrix
Realises the "sparse"-matrix that operates on indexes and saves the penalties associated with a given...
Definition: GRBreakMatrix.h:80
GRPenaltyEntry::GetBreakList
intlist * GetBreakList(intlist *mybreaklist)
KF_List
Definition: GRBreakMatrix.h:24
GRBreakMatrix::GetAt
pentrylist * GetAt(int row, int column)

Guido Project Copyright © 2019 Grame-CNCM