INGOR
Loading...
Searching...
No Matches
score
Score.h
1
/*
2
Score.{h,c} : Score abstraction
3
Copyright (C) 2018-2021, Yoshinori Tamada <tamada A T ytlab.jp>
4
All rights reserved.
5
6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions
8
are met:
9
10
* Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
12
13
* Redistributions in binary form must reproduce the above copyright
14
notice, this list of conditions and the following disclaimer in
15
the documentation and/or other materials provided with the
16
distribution.
17
18
* Neither the name of Hirosaki University, Kyoto University, The
19
University of Tokyo, nor the names of its contributors may be used
20
to endorse or promote products derived from this software without
21
specific prior written permission.
22
23
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
POSSIBILITY OF SUCH DAMAGE.
35
*/
36
37
#ifndef __SCORE_H
38
#define __SCORE_H
39
40
#include "util/ytData.h"
41
#include "net/ytNode.h"
42
#include "net/ytEdge.h"
43
#include "net/ytNetwork.h"
44
45
typedef
struct
{
47
char
*
name
;
48
50
void
* (*init)(
ytData
* data,
ytKeyValues
* args);
51
53
double (*score)(
void
* buff,
const
int
j,
const
int
* parents,
const
int
q);
54
56
void (*reinit)(
void
* buff,
ytData
* data);
57
59
void (*cache)(
void
* buff,
int
on);
60
61
void (*edgeProp)(
void
* buff,
const
int
j,
const
int
* parents,
const
int
q,
62
const
int
k,
ytEdge
* edge);
63
64
void (*nodeProp)(
void
* buff,
int
i,
ytNode
* node);
65
66
void (*finalize)(
void
* buff);
67
68
void (*partialResidual)(
void
* buff,
const
int
j,
const
int
* parents,
const
int
q,
69
FILE ** fp,
double
* ll);
70
71
void (*setEdgeProp)(
void
* buff,
const
int
j,
const
int
* parents,
const
int
q,
72
const
int
k,
const
ytEdge
* edge);
73
74
void (*setNodeProp)(
void
* buff,
const
int
j,
const
ytNode
* node);
75
76
void (*status)(
void
* buff);
77
78
void (*setParam)(
void
* buff,
const
char
* key,
ytObject
* value);
79
81
void
*
buff
;
82
}
Score
;
83
84
Score
* Score_get(
const
char
* name);
85
86
#endif
/* __SCORE_H */
87
88
/* End of file */
ytEdge
Network edge.
ytKeyValues
key-value pairs.
ytObject
The basis class.
Score
Definition
Score.h:45
Score::buff
void * buff
Pointer to the score buffer that is used by the score functions.
Definition
Score.h:81
Score::name
char * name
Score name.
Definition
Score.h:47
ytData
General data container.
Definition
ytData.h:73
ytNode
Network node.
Definition
ytNode.h:42
Generated by
1.9.8