All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

#include <cluster-utils.h>

Collaboration diagram for RefineClustersOptions:

Public Member Functions

 RefineClustersOptions ()
 
 RefineClustersOptions (int32 num_iters_in, int32 top_n_in)
 
void Write (std::ostream &os, bool binary) const
 
void Read (std::istream &is, bool binary)
 

Public Attributes

int32 num_iters
 
int32 top_n
 

Detailed Description

Definition at line 129 of file cluster-utils.h.

Constructor & Destructor Documentation

Definition at line 132 of file cluster-utils.h.

RefineClustersOptions ( int32  num_iters_in,
int32  top_n_in 
)
inline

Definition at line 133 of file cluster-utils.h.

134  : num_iters(num_iters_in), top_n(top_n_in) {}

Member Function Documentation

void Read ( std::istream &  is,
bool  binary 
)

Definition at line 1282 of file cluster-utils.cc.

References kaldi::ExpectToken(), RefineClustersOptions::num_iters, kaldi::ReadBasicType(), and RefineClustersOptions::top_n.

Referenced by QuestionsForKey::Read().

1282  {
1283  ExpectToken(is, binary, "<RefineClustersOptions>");
1284  ReadBasicType(is, binary, &num_iters);
1285  ReadBasicType(is, binary, &top_n);
1286  ExpectToken(is, binary, "</RefineClustersOptions>");
1287 }
void ReadBasicType(std::istream &is, bool binary, T *t)
ReadBasicType is the name of the read function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:55
void ExpectToken(std::istream &is, bool binary, const char *token)
ExpectToken tries to read in the given token, and throws an exception on failure. ...
Definition: io-funcs.cc:188
void Write ( std::ostream &  os,
bool  binary 
) const

Definition at line 1275 of file cluster-utils.cc.

References RefineClustersOptions::num_iters, RefineClustersOptions::top_n, kaldi::WriteBasicType(), and kaldi::WriteToken().

Referenced by QuestionsForKey::Write().

1275  {
1276  WriteToken(os, binary, "<RefineClustersOptions>");
1277  WriteBasicType(os, binary, num_iters);
1278  WriteBasicType(os, binary, top_n);
1279  WriteToken(os, binary, "</RefineClustersOptions>");
1280 }
void WriteToken(std::ostream &os, bool binary, const char *token)
The WriteToken functions are for writing nonempty sequences of non-space characters.
Definition: io-funcs.cc:134
void WriteBasicType(std::ostream &os, bool binary, T t)
WriteBasicType is the name of the write function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:34

Member Data Documentation


The documentation for this struct was generated from the following files: