Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CommonTools
Statistics
interface
SequentialPartitionGenerator.h
Go to the documentation of this file.
1
#ifndef SequentialPartitionGenerator_H
2
#define SequentialPartitionGenerator_H
3
4
#include <vector>
5
#include <algorithm>
6
10
class
SequentialPartitionGenerator
{
11
public
:
12
typedef
std::vector<int>
Partition
;
13
14
public
:
15
16
/***
17
* Generates a (number-theoretic) partition of n into k partitions,
18
* the invidual "partitions" being between pmin and pmax.
19
*/
20
SequentialPartitionGenerator
(
int
n
,
int
k
,
int
pmin=1 );
21
SequentialPartitionGenerator
(
int
n
,
int
k
,
int
pmin,
int
pmax );
26
Partition
next_partition
();
27
28
private
:
29
int
the_n
;
30
int
the_k
;
31
int
the_pmin
;
32
int
the_pmax
;
33
Partition
the_part
;
34
mutable
int
n_first
;
35
mutable
int
n_next
;
36
37
private
:
38
bool
first_part
(
Partition
&
p
,
int
k
,
int
n
,
int
pmin,
int
pmax)
const
;
39
bool
next_part
(
Partition
&
p
)
const
;
40
};
41
42
#endif
SequentialPartitionGenerator::the_part
Partition the_part
Definition:
SequentialPartitionGenerator.h:33
SequentialPartitionGenerator::SequentialPartitionGenerator
SequentialPartitionGenerator(int n, int k, int pmin=1)
Definition:
SequentialPartitionGenerator.cc:3
SequentialPartitionGenerator::the_pmax
int the_pmax
Definition:
SequentialPartitionGenerator.h:32
SequentialPartitionGenerator::n_next
int n_next
Definition:
SequentialPartitionGenerator.h:35
SequentialPartitionGenerator::next_part
bool next_part(Partition &p) const
Definition:
SequentialPartitionGenerator.cc:46
gen::k
int k[5][pyjets_maxn]
Definition:
Cascade2Hadronizer.cc:79
SequentialPartitionGenerator::first_part
bool first_part(Partition &p, int k, int n, int pmin, int pmax) const
Definition:
SequentialPartitionGenerator.cc:20
SequentialPartitionGenerator::the_pmin
int the_pmin
Definition:
SequentialPartitionGenerator.h:31
SequentialPartitionGenerator::Partition
std::vector< int > Partition
Definition:
SequentialPartitionGenerator.h:12
n
int n
Definition:
DTDataIntegrityTask.cc:30
SequentialPartitionGenerator::next_partition
Partition next_partition()
Definition:
SequentialPartitionGenerator.cc:9
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
SequentialPartitionGenerator::the_k
int the_k
Definition:
SequentialPartitionGenerator.h:30
SequentialPartitionGenerator::n_first
int n_first
Definition:
SequentialPartitionGenerator.h:34
SequentialPartitionGenerator
Definition:
SequentialPartitionGenerator.h:10
SequentialPartitionGenerator::the_n
int the_n
Definition:
SequentialPartitionGenerator.h:29
Generated for CMSSW Reference Manual by
1.8.5