Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Apply .clang-format coding style #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: LLVM

# indent 4 spaces
IndentWidth: 4

# break before function
#BreakBeforeBraces: Linux
BreakBeforeBinaryOperators: NonAssignment
#BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
AllowShortFunctionsOnASingleLine: false
# Pas de saut de ligne entre type de retour et fonction
AlwaysBreakAfterDefinitionReturnType: None
PenaltyReturnTypeOnItsOwnLine: 300
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true

ColumnLimit: 180

# arguments and parameters in same line or one line for each
BinPackArguments: false
BinPackParameters: false

# keep up to two empty lines
MaxEmptyLinesToKeep: 2
256 changes: 140 additions & 116 deletions baumwelch.cc

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions baumwelch.h
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
#ifndef BAUMWELCH_H
#define BAUMWELCH_H

#include <cmath>
#include <cstdlib>
#include <vector>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <iostream>
#include <string>
#include <cmath>
#include <fstream>
#include <vector>

#include "obsData.h"
#include "modelprob.h"
#include "hmmresults.h"
#include "modelprob.h"
#include "obsData.h"

using namespace std ;
using namespace std;

class baumWelch
{
public:
baumWelch(obsSequence *data);
void computeBaumWelch(hmmResults *results, modelProb *model );
void computeBaumWelch3states(hmmResults *results, modelProb *model );
public:
baumWelch(obsSequence *data);
void computeBaumWelch(hmmResults *results, modelProb *model);
void computeBaumWelch3states(hmmResults *results, modelProb *model);

protected:
obsSequence *mObsSequence;
hmmResults *mHmmResults;
modelProb *mModelProb;
protected:
obsSequence *mObsSequence;
hmmResults *mHmmResults;
modelProb *mModelProb;
};

#endif // BAUMWELCH_H

Loading