Rheolef
7.2
an efficient C++ finite element environment
Loading...
Searching...
No Matches
msg_left_permutation_apply.h
Go to the documentation of this file.
1
#ifndef _RHEO_MSG_LEFT_PERMUTATION_APPLY_H
2
#define _RHEO_MSG_LEFT_PERMUTATION_APPLY_H
23
namespace
rheolef
{
24
/*F:
25
NAME: msg_left_permutation_apply -- sequentail apply (@PACKAGE@ @VERSION@)
26
DESCRIPTION:
27
Applies a left permutation to an array.
28
ALGORITHM:
29
msg_left_permutation_apply
30
31
"input": the length array
32
| x(0:nx-1), py(0:n-1)
33
"output": the pointer array and the total size
34
| y(0:n)
35
begin
36
| for i := 0 to n-1 do
37
| y(py(i)) := x(i)
38
| endfor
39
end
40
COMPLEXITY:
41
Time and memory complexity is O(n).
42
METHODS: @msg_left_permutation_apply
43
AUTHORS:
44
LMC-IMAG, 38041 Grenoble cedex 9, France
45
| Pierre.Saramito@imag.fr
46
DATE: 6 january 1999
47
END:
48
*/
49
50
//<msg_left_permutation_apply:
51
template
<
52
class
InputIterator1,
53
class
InputIterator2,
54
class
SetOp,
55
class
OutputRandomIterator>
56
void
57
msg_left_permutation_apply
(
58
InputIterator1 x,
59
SetOp op,
60
InputIterator2 py,
61
InputIterator2 last_py,
62
OutputRandomIterator y)
63
{
64
while
(py != last_py)
65
op(y[*py++], *x++);
66
}
67
//>msg_left_permutation_apply:
68
}
// namespace rheolef
69
#endif
// _RHEO_MSG_LEFT_PERMUTATION_APPLY_H
rheolef
This file is part of Rheolef.
Definition
compiler_eigen.h:39
rheolef::msg_left_permutation_apply
void msg_left_permutation_apply(InputIterator1 x, SetOp op, InputIterator2 py, InputIterator2 last_py, OutputRandomIterator y)
Definition
msg_left_permutation_apply.h:57