Points&Forces (core)
Software tools facilitating the task of surveying architecture
include
a_mat_r.h
Go to the documentation of this file.
1
/*
2
Copyright 2010-2011 Pierre SMARS (smars@yuntech.edu.tw)
3
This program is free software: you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation, either version 2 of the License, or
6
(at your option) any later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
14
along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
#ifndef _VE_MAT_R_H_
17
#define _VE_MAT_R_H_
18
19
// .NAME a_mat - a row matrix unit
20
// .PORTABILITY : ansi C++
21
// .SECTION Author
22
// Pierre Smars
23
24
#include <valarray>
25
#include "
a_mat.h
"
26
28
class
a_mat_r
:
public
a_mat
29
{
30
public
:
31
a_mat_r
(
UI
i,
double
v = 0) :
a_mat
(
UI
(1),i,v) {}
//v : value
32
a_mat_r
(
int
i,
double
v = 0) :
a_mat
(int(1),i,v) {}
33
a_mat_r
&
operator=
(
const
a_mat
& m);
34
inline
double
&
operator()
(
const
UI
i) {
return
(*
x_
)[i];}
35
inline
double
operator()
(
const
UI
i)
const
{
return
(*
x_
)[i];}
36
double
sumsq
()
const
;
37
double
norm
()
const
;
38
void
normalise
();
39
void
teller
();
40
};
41
42
a_mat_r
cross
(
a_mat_r
&,
a_mat_r
&);
// cross product (works only with maxi_=3)
43
44
#endif
a_mat.h
UI
unsigned int UI
Definition:
a_mat.h:23
cross
a_mat_r cross(a_mat_r &, a_mat_r &)
Definition:
a_mat_r.cxx:52
a_mat_r
a row matrix unit
Definition:
a_mat_r.h:29
a_mat_r::a_mat_r
a_mat_r(UI i, double v=0)
Definition:
a_mat_r.h:31
a_mat_r::norm
double norm() const
Definition:
a_mat_r.cxx:40
a_mat_r::operator()
double operator()(const UI i) const
Definition:
a_mat_r.h:35
a_mat_r::operator()
double & operator()(const UI i)
Definition:
a_mat_r.h:34
a_mat_r::sumsq
double sumsq() const
Definition:
a_mat_r.cxx:32
a_mat_r::operator=
a_mat_r & operator=(const a_mat &m)
Definition:
a_mat_r.cxx:24
a_mat_r::a_mat_r
a_mat_r(int i, double v=0)
Definition:
a_mat_r.h:32
a_mat_r::teller
void teller()
a_mat_r::normalise
void normalise()
Definition:
a_mat_r.cxx:45
a_mat
Definition:
a_mat.h:42
a_mat::x_
std::valarray< double > * x_
Definition:
a_mat.h:91
Generated on Tue Sep 6 2022 18:50:16 for Points&Forces (core) by
1.9.1