Main Page
Modules
Namespaces
Classes
Files
File List
File Members
include
armadillo_bits
span.hpp
Go to the documentation of this file.
1
// Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
2
// Copyright (C) 2010-2011 Conrad Sanderson
3
// Copyright (C) 2011 Stanislav Funiak
4
//
5
// This file is part of the Armadillo C++ library.
6
// It is provided without any warranty of fitness
7
// for any purpose. You can redistribute this file
8
// and/or modify it under the terms of the GNU
9
// Lesser General Public License (LGPL) as published
10
// by the Free Software Foundation, either version 3
11
// of the License or (at your option) any later version.
12
// (see http://www.opensource.org/licenses for more info)
13
14
15
18
19
20
struct
span_alt
{};
21
22
23
template
<
typename
Dummy =
int
>
24
class
span_base
25
{
26
public
:
27
static
const
span_alt
all
;
28
};
29
30
31
template
<
typename
Dummy>
32
const
span_alt
span_base<Dummy>::all
=
span_alt
();
33
34
35
class
span
:
public
span_base
<>
36
{
37
public
:
38
39
uword
a
;
40
uword
b
;
41
bool
whole
;
42
43
inline
44
span
()
45
: whole(true)
46
{
47
}
48
49
50
inline
51
span
(
const
span_alt
&)
52
: whole(true)
53
{
54
}
55
56
// TODO:
57
// if the "explicit" keyword is removed or commented out,
58
// the compiler will be able to automatically convert integers to an instance of the span class.
59
// this is useful for Cube::operator()(span&, span&, span&),
60
// but it might have unintended consequences or interactions elsewhere.
61
// as such, removal of "explicit" needs thorough testing.
62
inline
63
explicit
64
span
(
const
uword
in_a)
65
: a(in_a)
66
, b(in_a)
67
, whole(false)
68
{
69
}
70
71
inline
72
span
(
const
uword
in_a,
const
uword
in_b)
73
: a(in_a)
74
, b(in_b)
75
, whole(false)
76
{
77
}
78
79
};
80
81
82
span::b
uword b
Definition:
span.hpp:40
span::whole
bool whole
Definition:
span.hpp:41
span
Definition:
span.hpp:35
uword
u32 uword
Definition:
typedef.hpp:85
span::span
span(const uword in_a)
Definition:
span.hpp:64
span::a
uword a
Definition:
span.hpp:39
span::span
span()
Definition:
span.hpp:44
span::span
span(const span_alt &)
Definition:
span.hpp:51
span_base::all
static const span_alt all
Definition:
span.hpp:27
span_base
Definition:
span.hpp:24
span::span
span(const uword in_a, const uword in_b)
Definition:
span.hpp:72
span_alt
Definition:
span.hpp:20
armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58