ALPSCore reference
Main Page
Related Pages
Classes
Files
File List
File Members
alps
alea
internal
galois.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1998-2018 ALPS Collaboration. See COPYRIGHT.TXT
3
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
4
* For use in publications, see ACKNOWLEDGE.TXT
5
*/
6
#pragma once
7
8
#include <
alps/alea/core.hpp
>
9
10
namespace
alps
{
namespace
alea {
namespace
internal {
11
37
class
galois_hopper
38
{
39
public
:
41
galois_hopper
(
size_t
size
);
42
44
galois_hopper
&
operator++
();
45
47
galois_hopper
operator++
(
int
);
48
50
void
reset
(
bool
merge_mode
=
false
);
51
53
size_t
current
()
const
{
return
current_; }
54
56
bool
merge_mode
()
const
{
return
level_ != 0; }
57
59
size_t
merge_into
()
const
{
return
(current_ + skip_) % (size_ + 1); }
60
62
double
factor
()
const
{
return
factor_; }
63
65
size_t
level
()
const
{
return
level_; }
66
68
size_t
cycle
()
const
{
return
cycle_; }
69
70
private
:
71
void
advance_fill();
72
void
advance_galois();
73
74
size_t
size_;
75
size_t
level_, factor_;
76
size_t
current_, skip_, level_pos_, cycle_;
77
};
78
79
}}}
alps::size
std::enable_if<!is_sequence< T >::value, std::size_t >::type size(T const &)
Definition:
size.hpp:20
alps::alea::internal::galois_hopper::reset
void reset(bool merge_mode=false)
Definition:
galois.cpp:19
alps::alea::internal::galois_hopper::merge_into
size_t merge_into() const
Definition:
galois.hpp:59
alps::alea::internal::galois_hopper::galois_hopper
galois_hopper(size_t size)
Definition:
galois.cpp:10
alps::alea::internal::galois_hopper::current
size_t current() const
Definition:
galois.hpp:53
alps::alea::internal::galois_hopper::level
size_t level() const
Definition:
galois.hpp:65
alps::alea::internal::galois_hopper::merge_mode
bool merge_mode() const
Definition:
galois.hpp:56
alps::alea::internal::galois_hopper::cycle
size_t cycle() const
Definition:
galois.hpp:68
core.hpp
alps::alea::internal::galois_hopper
Definition:
galois.hpp:37
alps::alea::internal::galois_hopper::operator++
galois_hopper & operator++()
Definition:
galois.cpp:42
alps::alea::internal::galois_hopper::factor
double factor() const
Definition:
galois.hpp:62
alps
Definition:
boost_array_functions.hpp:24
Generated on Sun Oct 14 2018 12:18:30 for ALPSCore reference by
1.8.11