Skip to content

Commits on Source 13

all:
g++ -O3 -std=c++11 spaced.cc variance.cpp patternset.cpp extkey.cpp -o spaced -fopenmp
g++ -O3 -fopenmp -std=c++11 src/spaced.cc src/variance.cpp src/patternset.cpp -o spaced
spaced (1.0.2+dfsg-2) UNRELEASED; urgency=medium
spaced (1.2.0-201605+dfsg-1) UNRELEASED; urgency=medium
* Team upload.
* New upstream source
* Fix get-orig-source script
* Provide manpage in debian/spaced.1 instead of patch
* Fake watch file
* debhelper 11
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.1.4
-- Andreas Tille <tille@debian.org> Sat, 07 Jul 2018 14:53:39 +0200
......
Makefile
config.h
config.log
config.status
stamp-h1
src/Makefile
Source: spaced
Section: science
Priority: optional
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Uploaders: Fabian Klötzl <kloetzl@evolbio.mpg.de>
Build-Depends:
debhelper (>= 9),
dh-autoreconf,
Standards-Version: 3.9.7
Vcs-Browser: https://anonscm.debian.org/git/debian-med/spaced.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/spaced.git
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~)
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/med-team/spaced
Vcs-Git: https://salsa.debian.org/med-team/spaced.git
Homepage: http://spaced.gobics.de/
Package: spaced
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: alignment-free sequence comparison using spaced words
Spaced (Words) is a new approach to alignment-free sequence
comparison. While most alignment-free algorithms compare the
......
......@@ -46,7 +46,7 @@ UPSTREAMTARDIR=`find . -mindepth 1 -maxdepth 1 -type d -name "${NAME}*"`
cd "${UPSTREAMTARDIR}"
rm -f ${EXCLUDE}
# obtain version from file variance.h
VERSION=`grep '@version: [0-9][0-9.]\+ [0-9/]\+' $(find . -name variance.h) | sed 's#.*@version: \([0-9][0-9.]\+\) \([0-9]\+\)/\([0-9]\+\)#\1-\3\2#'`
VERSION=`grep '@version: [0-9][0-9.]\+ [0-9/]\+' $(find . -name variance.h) | sed 's#.*@version: \([0-9][0-9.]\+\) \([0-9]\+\)/\([0-9]\+\)#\1-\3\2#'`+dfsg
cd ..
# Fix upstreams non-Gnu naming scheme
......
From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian@kloetzl.info>
Date: Wed, 23 Mar 2016 12:00:11 +0100
Subject: Add man page
---
spaced.1 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 spaced.1
diff --git a/spaced.1 b/spaced.1
new file mode 100644
index 0000000..9878d2b
--- /dev/null
+++ b/spaced.1
@@ -0,0 +1,60 @@
+.TH SPACED "1" "February 2016" "1.0.2" ""
+.SH NAME
+spaced \- alignment-free sequence comparison
+.SH SYNOPSIS
+.B spaced
+[\fI-r\fR] [\fI-k INT\fR] [\fI-l INT\fR] [\fI-n INT\fR] [\fI-t INT\fR] [\fI-d TYPE\fR] [\fI-f FILE\fR] \fIFILES\fR...
+.SH DESCRIPTION
+.TP
+Spaced Words is a new approach to alignment-free sequence comparison. While most alignment-free algorithms compare the word-composition of sequences, Spaced Words uses a pattern of care and don't care positions. The occurrence of a spaced word in a sequence is then defined by the characters at the match positions only, while the characters at the don't care positions are ignored (this was originally inspired by the PatternHunter algorithm for homology search in databases). Instead of comparing the frequencies of contiguous words in the input sequences, our new approach compares the frequencies of the spaced words according to the pre-defined pattern. An information-theoretic distance measure is then used to define pairwise distances on the set of input sequences based on their spaced-word frequencies. The original version of our spaced-words approach was published in Boden et al.(2013).
+.SH OUTPUT
+The output is a symmetrical distance matrix similar to \fIPHYLIP\fR format, with each entry representing divergence with a positive real number. A distance of zero means that two sequences are identical, whereas other values are estimates for the nucleotide substitution rate (Jukes-Cantor corrected).
+.SH OPTIONS
+.TP
+\fB\-o\fR <file>
+Print the distance matrix to the given \fIfile\fR. Default is \fIDMat\fR.
+.TP
+\fB\-k\fR <int>
+Set the patterns weight. Default: 14.
+.TP
+\fB\-l\fR <int>
+Set \fIdon't care\fR positions for the used patterns. Default: 15.
+.TP
+\fB\-n\fR <int>
+Set the number of patterns. Default: 5.
+.TP
+\fB\-f\fR <file>
+Instead of generating new patterns, use read them from the given file.
+.TP
+\fB\-t\fR <INT>
+The number of threads to be used; by default, 25 threads are used.
+.br
+Multithreading is only available if \fBspaced\fR was compiled with OpenMP support.
+.TP
+\fB-r\fR
+Skip comparison with the reverse complement.
+.TP
+\fB-d\fR <type>
+The distances can be compute with different measures. Available options are Euclidean (\fIEU\fR), Jensen-Shannon (\fIJS\fR), and evolutionary distance (\fIEV\fR). Default: EV.
+.TP
+\fB\-h\fR
+Prints the synopsis and an explanation of available options.
+.SH COPYRIGHT
+Copyright \(co 2016 Chris Leimeister <chris.leimeister@stud.uni-goettingen.de>
+License GPLv3+: GNU GPL version 3 or later.
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+The full license text is available at <http://gnu.org/licenses/gpl.html>.
+.PP
+.SH REFERENCES
+1) C.-A. Leimeister, M. Boden, S. Horwege, S. Lindner, B. Morgenstern (2014). Fast alignment-free sequence comparison using spaced-word frequencies, Bioinformatics <http://bioinformatics.oxfordjournals.org/content/early/2014/04/03/bioinformatics.btu177>
+.br
+2) S. Horwege, S. Linder, M. Boden, K. Hatje, M. Kollmar, C.-A. Leimeister, B. Morgenstern (2014). Spaced words and kmacs: fast alignment-free sequence comparison based on inexact word matches, Nucleic Acids Research 42, W7-W11 <http://nar.oxfordjournals.org/content/42/W1/W7.abstract>
+.br
+3) B. Morgenstern, B. Zhu, S. Horwege, C.-A Leimeister (2015). Estimating evolutionary distances between genomic sequences from spaced-word matches, Algorithms for Molecular Biology 10,5
+.SH BUGS
+.SS Reporting Bugs
+Please report bugs to <kloetzl@evolbio.mpg.de> or <chris.leimeister@stud.uni-goettingen.de>.
+.SS
+
......@@ -6,11 +6,9 @@ Subject: Fix FTBFS without OpenMP
sort.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sort.h b/sort.h
index bef900e..4034495 100644
--- a/sort.h
+++ b/sort.h
@@ -153,9 +153,9 @@ void writeDmat(vector<vector<double> > dmat, vector<sequence<uint> >& sequences,
--- a/src/sort.h
+++ b/src/sort.h
@@ -153,9 +153,9 @@ void writeDmat(vector<vector<double> > d
template<typename uint>
void spacedDNA(vector<string>& patternSet, unsigned char* seqData, uint n, int distance, int threads, int weight, int dontCare, bool revComp, string output){
......
......@@ -13,41 +13,19 @@ Subject: Add autotools buildsystem
create mode 100644 configure.ac
create mode 100644 m4/ax_cxx_compile_stdcxx_11.m4
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 0515a61..0000000
--- a/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-
-all:
- g++ -O3 -std=c++11 spaced.cc variance.cpp patternset.cpp extkey.cpp -o spaced -fopenmp
-
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..aaee67c
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS = spaced
+spaced_SOURCES = extkey.cpp extkey.h patternset.cpp patternset.h sort.h spaced.cc variance.cpp variance.h
+spaced_CPPFLAGS = $(OPENMP_CPPFLAGS) -Wall -Wextra -std=c++11 -Wno-char-subscripts
+spaced_CXXFLAGS = $(OPENMP_CXXFLAGS)
+
+man_MANS = spaced.1
@@ -0,0 +1,3 @@
+SUBDIRS = src
+
+dist_noinst_DATA = README COPYING
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..6808730
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,24 @@
@@ -0,0 +1,25 @@
+AC_PREREQ([2.69])
+AC_INIT([spaced], [1.0.2])
+AM_INIT_AUTOMAKE([-Wall foreign])
+
+AC_CONFIG_SRCDIR([extkey.cpp])
+AC_CONFIG_HEADERS([config.h])
+
+AC_PROG_CXX
......@@ -65,11 +43,10 @@ index 0000000..6808730
+
+AC_CHECK_FUNCS([pow sqrt])
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile
+ src/Makefile])
+
+AC_OUTPUT
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4
new file mode 100644
index 0000000..f3779d6
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx_11.m4
@@ -0,0 +1,162 @@
......@@ -235,3 +212,18 @@ index 0000000..f3779d6
+ AC_SUBST(HAVE_CXX11)
+ fi
+])
--- a/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-
-all:
- g++ -O3 -fopenmp -std=c++11 src/spaced.cc src/variance.cpp src/patternset.cpp -o spaced
-
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,5 @@
+bin_PROGRAMS = spaced
+spaced_SOURCES = patternset.cpp patternset.h sort.h spaced.cc variance.cpp variance.h
+spaced_CPPFLAGS = $(OPENMP_CPPFLAGS) -Wall -Wextra -std=c++11 -Wno-char-subscripts
+spaced_CXXFLAGS = $(OPENMP_CXXFLAGS)
+
Author: Andreas Tille <tille@debian.org>
Last-Update: Sat, 07 Jul 2018 14:53:39 +0200
Description: Fix some types
--- a/src/sort.h
+++ b/src/sort.h
@@ -130,7 +130,7 @@ void writeDmat(vector<vector<double> > d
ofstream outfile;
outfile.open(filename.c_str());
outfile << sequences.size() << endl;
- for (int i = 0; i < sequences.size(); i++) {
+ for (unsigned i = 0; i < sequences.size(); i++) {
for(uint k=0; k<10;k++){
if( k+sequences[i].headerStart <= sequences[i].headerEnd )
outfile << seqData[k+sequences[i].headerStart];
@@ -138,7 +138,7 @@ void writeDmat(vector<vector<double> > d
outfile << " ";
}
outfile << " ";
- for (int j = 0; j < sequences.size(); j++) {
+ for (unsigned j = 0; j < sequences.size(); j++) {
if (i > j)
outfile << setprecision(12) << dmat[i][j] << " ";
else if(j>i)
@@ -238,7 +238,7 @@ void spacedDNA(vector<string>& patternSe
}
}
}
- for(int i=0; i< sequences.size();i++){
+ for(unsigned i=0; i< sequences.size();i++){
for(int j=0; j<4;j++){
sequences[i].frequencies[j]=sequences[i].frequencies[j]/sequences[i].length;
sequences[i].frequenciesRevComp[j]=sequences[i].frequenciesRevComp[j]/sequences[i].length;
@@ -252,8 +252,8 @@ void spacedDNA(vector<string>& patternSe
vector<vector <vector <double> > > dmat(threads, vector< vector<double> >(seqNum, vector<double>(seqNum,0)));
vector<vector <double> > dmatFinal(seqNum, vector<double>(seqNum,0));
vector<vector<double> > row(threads, vector<double>(seqNum*2));
- for(int p = 0; p < patternSet.size(); p++ ){
- for(int k = 0; k < patternSet[p].length(); k++){
+ for(unsigned p = 0; p < patternSet.size(); p++ ){
+ for(unsigned k = 0; k < patternSet[p].length(); k++){
if (patternSet[p][k] == '1')
matchPos.push_back(k);
else
@@ -283,7 +283,7 @@ void spacedDNA(vector<string>& patternSe
bits=weight*2-2;
unsigned char c;
bool correctWord=true;
- for(int o=0; o<matchPos.size();o++){
+ for(unsigned o=0; o<matchPos.size();o++){
uint pos=matchPos[o];
c= seqData[j+pos];
if(c=='N')
@@ -304,7 +304,7 @@ void spacedDNA(vector<string>& patternSe
bits=weight*2-2;
unsigned char c;
bool correctWord=true;
- for(int o=0; o<matchPos.size();o++){
+ for(unsigned o=0; o<matchPos.size();o++){
uint pos=matchPos[o];
c= seqData[j+pos];
if(c=='N')
@@ -551,8 +551,8 @@ void spacedProt(vector<string>& patternS
vector<vector <vector <double> > > dmat(threads, vector< vector<double> >(seqNum, vector<double>(seqNum)));
vector<vector <double> > dmatFinal(seqNum, vector<double>(seqNum,0));
vector<vector<double> > row(threads, vector<double>(seqNum));
- for(int p = 0; p < patternSet.size(); p++ ){
- for(int k = 0; k < patternSet[p].length(); k++){
+ for(unsigned p = 0; p < patternSet.size(); p++ ){
+ for(unsigned k = 0; k < patternSet[p].length(); k++){
if (patternSet[p][k] == '1')
matchPos.push_back(k);
else
@@ -576,7 +576,7 @@ void spacedProt(vector<string>& patternS
w=0;
bits=weight*5-5;
unsigned char c;
- for(int o=0; o<matchPos.size();o++){
+ for(unsigned o=0; o<matchPos.size();o++){
uint pos=matchPos[o];
c= seqData[j+pos];
w|=(unsigned long long) alphabet[c] << bits;
0001-Add-man-page.patch
0002-Fix-FTBFS-without-OpenMP.patch
0003-Add-autotools-buildsystem.patch
0004-signed.patch
......@@ -3,7 +3,7 @@
# DH_VERBOSE := 1
%:
dh $@ --with autoreconf
dh $@
get-orig-source:
. debian/get-orig-source
.TH SPACED "1" "February 2016" "1.0.2" ""
.SH NAME
spaced \- alignment-free sequence comparison
.SH SYNOPSIS
.B spaced
[\fI-r\fR] [\fI-k INT\fR] [\fI-l INT\fR] [\fI-n INT\fR] [\fI-t INT\fR] [\fI-d TYPE\fR] [\fI-f FILE\fR] \fIFILES\fR...
.SH DESCRIPTION
.TP
Spaced Words is a new approach to alignment-free sequence comparison. While most alignment-free algorithms compare the word-composition of sequences, Spaced Words uses a pattern of care and don't care positions. The occurrence of a spaced word in a sequence is then defined by the characters at the match positions only, while the characters at the don't care positions are ignored (this was originally inspired by the PatternHunter algorithm for homology search in databases). Instead of comparing the frequencies of contiguous words in the input sequences, our new approach compares the frequencies of the spaced words according to the pre-defined pattern. An information-theoretic distance measure is then used to define pairwise distances on the set of input sequences based on their spaced-word frequencies. The original version of our spaced-words approach was published in Boden et al.(2013).
.SH OUTPUT
The output is a symmetrical distance matrix similar to \fIPHYLIP\fR format, with each entry representing divergence with a positive real number. A distance of zero means that two sequences are identical, whereas other values are estimates for the nucleotide substitution rate (Jukes-Cantor corrected).
.SH OPTIONS
.TP
\fB\-o\fR <file>
Print the distance matrix to the given \fIfile\fR. Default is \fIDMat\fR.
.TP
\fB\-k\fR <int>
Set the patterns weight. Default: 14.
.TP
\fB\-l\fR <int>
Set \fIdon't care\fR positions for the used patterns. Default: 15.
.TP
\fB\-n\fR <int>
Set the number of patterns. Default: 5.
.TP
\fB\-f\fR <file>
Instead of generating new patterns, use read them from the given file.
.TP
\fB\-t\fR <INT>
The number of threads to be used; by default, 25 threads are used.
.br
Multithreading is only available if \fBspaced\fR was compiled with OpenMP support.
.TP
\fB-r\fR
Skip comparison with the reverse complement.
.TP
\fB-d\fR <type>
The distances can be compute with different measures. Available options are Euclidean (\fIEU\fR), Jensen-Shannon (\fIJS\fR), and evolutionary distance (\fIEV\fR). Default: EV.
.TP
\fB\-h\fR
Prints the synopsis and an explanation of available options.
.SH COPYRIGHT
Copyright \(co 2016 Chris Leimeister <chris.leimeister@stud.uni-goettingen.de>
License GPLv3+: GNU GPL version 3 or later.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
The full license text is available at <http://gnu.org/licenses/gpl.html>.
.PP
.SH REFERENCES
1) C.-A. Leimeister, M. Boden, S. Horwege, S. Lindner, B. Morgenstern (2014). Fast alignment-free sequence comparison using spaced-word frequencies, Bioinformatics <http://bioinformatics.oxfordjournals.org/content/early/2014/04/03/bioinformatics.btu177>
.br
2) S. Horwege, S. Linder, M. Boden, K. Hatje, M. Kollmar, C.-A. Leimeister, B. Morgenstern (2014). Spaced words and kmacs: fast alignment-free sequence comparison based on inexact word matches, Nucleic Acids Research 42, W7-W11 <http://nar.oxfordjournals.org/content/42/W1/W7.abstract>
.br
3) B. Morgenstern, B. Zhu, S. Horwege, C.-A Leimeister (2015). Estimating evolutionary distances between genomic sequences from spaced-word matches, Algorithms for Molecular Biology 10,5
.SH BUGS
.SS Reporting Bugs
Please report bugs to <kloetzl@evolbio.mpg.de> or <chris.leimeister@stud.uni-goettingen.de>.
.SS
# Use the d/get-orig-source script until upstream fixes its releases.
#version=3
#http://spaced.gobics.de/ .*/spaced-(.*)\.tar\.gz
# if tweaking of source is needed
# \
# debian debian/get-orig-source
# if you need to repack and choose +dfsg prefix
# opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,compress=xz" \
version=4
opts=dversionmangle=s/.*/0.No-Release/ \
https://people.debian.org/~eriberto/ FakeWatchNoUpstreamReleaseForThisPackage-(\d\S+)\.gz
/**
* This programm calculates the variance/OC and/or the sensitivity of a set of pattern with the same weight.
* It is possible to improve your patternset and read patterns from a file.
*
* extended key object file
*
* For theory please have a look at:
*
* B. Morgenstern, B. Zhu, S. Horwege, C.-A Leimeister (2015)
* Estimating evolutionary distances between genomic sequences from spaced-word matches
* Algorithms for Molecular Biology 10, 5. (http://www.almob.org/content/10/1/5/abstract)
*
*
* @author: Lars Hahn - 26.10.2015, Georg-August-Universitaet Goettingen
* @version: 1.0.2 11/2015
*/
#include "extkey.h"
/*---Variables---------------------------------------------------------------*/
/*===Main-Part===============================================================*/
/*---Constructor-& Init------------------------------------------------------*/
extkey::extkey(){
extkey(1,1);
}
extkey::extkey(int pos, double value){
this->pos = pos;
this->value = value;
}
/*---Functions---------------------------------------------------------------*/
int extkey::GetPos(){
return pos;
}
double extkey::GetValue(){
return value;
}
void extkey::SetValue(double value){
this->value = value;
}
bool extkey::operator < (extkey const& p) const{
return (value < p.value);
}
bool extkey::operator <= (extkey const& p) const{
return (value <= p.value);
}
bool extkey::operator > (extkey const& p) const{
return (value > p.value);
}
bool extkey::operator >= (extkey const& p) const{
return (value >= p.value);
}
bool extkey::operator == (extkey const& p) const{
return (value == p.value);
}
bool extkey::operator || (extkey const& p) const{
return (value || p.value);
}
bool extkey::operator != (extkey const& p) const{
return (value != p.value);
}
/**
* This programm calculates the variance/OC and/or the sensitivity of a set of pattern with the same weight.
* It is possible to improve your patternset and read patterns from a file.
*
* extended key object header
*
* For theory please have a look at:
*
* B. Morgenstern, B. Zhu, S. Horwege, C.-A Leimeister (2015)
* Estimating evolutionary distances between genomic sequences from spaced-word matches
* Algorithms for Molecular Biology 10, 5. (http://www.almob.org/content/10/1/5/abstract)
*
*
* @author: Lars Hahn - 26.10.2015, Georg-August-Universitaet Goettingen
* @version: 1.0.2 11/2015
*/
#ifndef EXTKEY_H_
#define EXTKEY_H_
class extkey{
public:
extkey();
extkey(int pos, double value);
int GetPos();
double GetValue();
void SetValue(double value);
bool operator < (extkey const& p) const;
bool operator <= (extkey const& p) const;
bool operator > (extkey const& p) const;
bool operator >= (extkey const& p) const;
bool operator == (extkey const& p) const;
bool operator != (extkey const& p) const;
bool operator || (extkey const& p) const;
private:
int pos;
double value;
};
#endif
This diff is collapsed.
/**
* This programm calculates the variance/OC and/or the sensitivity of a set of pattern with the same weight.
* It is possible to improve your patternset and read patterns from a file.
*
* patternset object header
*
* For theory please have a look at:
*
* B. Morgenstern, B. Zhu, S. Horwege, C.-A Leimeister (2015)
* Estimating evolutionary distances between genomic sequences from spaced-word matches
* Algorithms for Molecular Biology 10, 5. (http://www.almob.org/content/10/1/5/abstract)
*
*
* @author: Lars Hahn - 26.10.2015, Georg-August-Universitaet Goettingen
* @version: 1.0.2 11/2015
*/
#ifndef PATTERNSET_H_
#define PATTERNSET_H_
#include <iostream>
#include <fstream>
#include <random>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "extkey.h"
class patternset {
public:
patternset();
patternset(char* pattern_file);
patternset(int size, int *length, int weight);
patternset(char* pattern_file, int size, int *length, int weight);
~patternset();
void ReInitPattern();
void ChangeBits(int number);
uint64_t ChangeBitPos(int pos, int pos_one, int pos_zero);
bool UniqPattern(int number);
std::vector<std::string> GetStringPattern();
std::string GetString(int number);
uint64_t GetPattern(int number);
int GetWeight();
int GetSize();
int* GetLength();
int GetLengthMean();
bool GetImprove();
bool GetUpdate();
double GetValue(int number);
void SetPattern(int number, uint64_t patt);
void Print();
void Silent();
void RandPatLength();
protected:
void Clear();
void TestPattern();
void VerifyConditions();
std::vector<std::string> SplitString(std::string pattern, char* tokens);
bool ValidatePatternsFormat(std::string pattern_form);
bool ValidatePatternConditions();
int PatternWeight(std::string pattern_wght);
int* PatternLength(std::vector<std::string> pattern_length);
void CreateLengths();
void CreateRandomPattern();
bool IsSetScore(int pattern);
int SymbolRandPos(int number, char symb);
int SymbolCalcPos(int number, char symb);
std::vector<int> GetSymbol(int number, char symb);
void ToString();
uint64_t ToBit(std::string p);
std::string BitString(uint64_t p);
double MaxNumberPattern(int p_weight, int p_length);
double Faculty(int value);
void SecureMessage(std::string errmsg, int pos);
private:
std::vector<uint64_t> pattern_set;
std::vector<std::string> string_pat;
std::vector<int> lengths;
int size;
int *length;
int length_mean;
int weight;
char* pattern_file = NULL;
bool improve;
bool update;
bool silent;
bool randpatleng;
};
#endif
This diff is collapsed.