v2DM-DOCI
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
UniMatrix.cpp
Go to the documentation of this file.
1
/*
2
* @BEGIN LICENSE
3
*
4
* Copyright (C) 2014-2015 Ward Poelmans
5
*
6
* This file is part of v2DM-DOCI.
7
*
8
* v2DM-DOCI is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* Foobar is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
20
*
21
* @END LICENSE
22
*/
23
24
#include <cassert>
25
#include <iostream>
26
27
#include "
UniMatrix.h
"
28
#include "
OptIndex.h
"
29
30
using namespace
doci2DM
;
31
36
UnitaryMatrix::UnitaryMatrix
(
int
n):
BlockMatrix
(1)
37
{
38
setDim
(0, n, 1);
39
}
40
46
UnitaryMatrix::UnitaryMatrix
(
const
simanneal::OptIndex
&index):
47
BlockMatrix
(index.getNirreps())
48
{
49
this->index.reset(
new
simanneal::OptIndex
(index));
50
51
for
(
int
i=0;i<index.
getNirreps
();i++)
52
{
53
setDim
(i, index.
getNORB
(i), 1);
54
(*this)[i].unit();
55
}
56
57
}
58
59
60
/* vim: set ts=3 sw=3 expandtab :*/
OptIndex.h
doci2DM::UnitaryMatrix::UnitaryMatrix
UnitaryMatrix(const simanneal::OptIndex &)
Definition:
UniMatrix.cpp:46
simanneal::OptIndex
Definition:
OptIndex.h:13
UniMatrix.h
simanneal::OptIndex::getNORB
int getNORB(const int irrep) const
Definition:
OptIndex.cpp:73
doci2DM::BlockStructure::setDim
void setDim(int, int, int)
Definition:
BlockStructure.cpp:76
doci2DM
Definition:
BlockStructure.cpp:205
simanneal::OptIndex::getNirreps
int getNirreps() const
Definition:
OptIndex.cpp:71
doci2DM::BlockStructure
Definition:
BlockStructure.h:45
UniMatrix.cpp
Generated by
1.8.9.1