repo.or.cz
/
lilypond.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
lilypond-0.1.44
[lilypond.git]
/
flower
/
vector.cc
blob
8f88b14f50c3b3dc6c9948ef9cf818ce13a90da2
1
#include
"vector.hh"
2
Vector
::
Vector
(
Array
<
Real
>
d
)
3
:
dat
(
d
)
4
{
5
6
}
7
Vector
::
Vector
(
Vector
const
&
n
)
8
:
dat
(
n
.
dat
)
9
{
10
}
11
12
Vector
13
Vector
::
operator
-()
const
14
{
15
Vector
v
(*
this
);
16
v
*=-
1
;
17
return
v
;
18
}
19
20
void
21
Vector
::
set_unit
(
int
j
)
22
{
23
fill
(
0.0
);
24
dat
[
j
] =
1.0
;
25
}