dune-common
2.6-git
dune
common
lcm.hh
Go to the documentation of this file.
1
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=4 sw=2 sts=2:
3
#ifndef DUNE_LCM_HH
4
#define DUNE_LCM_HH
5
10
#include <
dune/common/gcd.hh
>
11
12
namespace
Dune
13
{
14
28
template
<
long
m,
long
n>
29
struct
Lcm
30
{
31
static
void
conceptCheck
()
32
{
33
static_assert(0<m,
"m must be positive!"
);
34
static_assert(0<n,
"n must be positive!"
);
35
}
40
const
static
long
value
= (m/
Gcd<m,n>::value
)*n;
41
};
42
}
43
44
#endif
Dune::Gcd
Calculator of the greatest common divisor.
Definition:
gcd.hh:65
Dune
Dune namespace.
Definition:
alignedallocator.hh:9
Dune::Lcm
Calculate the least common multiple of two numbers.
Definition:
lcm.hh:29
Dune::Lcm::value
const static long value
The least common multiple of the template parameters m and n.
Definition:
lcm.hh:40
Dune::Lcm::conceptCheck
static void conceptCheck()
Definition:
lcm.hh:31
gcd.hh
Statically compute the greatest common divisor of two integers.
Generated by
1.8.17