votca
2025-dev
Loading...
Searching...
No Matches
vc2index.h
Go to the documentation of this file.
1
/*
2
* Copyright 2009-2020 The VOTCA Development Team
3
* (http://www.votca.org)
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License")
6
*
7
* You may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*
18
*/
19
20
#pragma once
21
#ifndef VOTCA_XTP_VC2INDEX_H
22
#define VOTCA_XTP_VC2INDEX_H
23
24
// VOTCA includes
25
#include <
votca/tools/types.h
>
26
27
namespace
votca
{
28
namespace
xtp {
36
class
vc2index
{
37
38
public
:
39
vc2index
(
Index
vmin,
Index
cmin,
Index
ctotal)
40
:
vmin_
(vmin),
cmin_
(cmin),
ctotal_
(ctotal) {};
41
42
inline
Index
I
(
Index
v
,
Index
c
)
const
{
43
return
ctotal_
* (
v
-
vmin_
) + (
c
-
cmin_
);
44
}
45
46
inline
Index
v
(
Index
index)
const
{
return
(index /
ctotal_
+
vmin_
); }
47
48
inline
Index
c
(
Index
index)
const
{
return
(index %
ctotal_
+
cmin_
); }
49
50
private
:
51
Index
vmin_
;
52
Index
cmin_
;
53
Index
ctotal_
;
54
};
55
}
// namespace xtp
56
}
// namespace votca
57
58
#endif
// VOTCA_XTP_VC2INDEX_H
votca::xtp::vc2index::ctotal_
Index ctotal_
Definition
vc2index.h:53
votca::xtp::vc2index::vc2index
vc2index(Index vmin, Index cmin, Index ctotal)
Definition
vc2index.h:39
votca::xtp::vc2index::cmin_
Index cmin_
Definition
vc2index.h:52
votca::xtp::vc2index::I
Index I(Index v, Index c) const
Definition
vc2index.h:42
votca::xtp::vc2index::vmin_
Index vmin_
Definition
vc2index.h:51
votca::xtp::vc2index::c
Index c(Index index) const
Definition
vc2index.h:48
votca::xtp::vc2index::v
Index v(Index index) const
Definition
vc2index.h:46
votca
base class for all analysis tools
Definition
basebead.h:33
votca::Index
Eigen::Index Index
Definition
types.h:26
types.h
xtp
include
votca
xtp
vc2index.h
Generated by
1.13.2