1mlib_MatrixUnit_U8(3MLIB) mediaLib Library Functions mlib_MatrixUnit_U8(3MLIB)
2
3
4

NAME

6       mlib_MatrixUnit_U8,       mlib_MatrixUnit_U8C,      mlib_MatrixUnit_S8,
7       mlib_MatrixUnit_S8C,     mlib_MatrixUnit_S16,     mlib_MatrixUnit_S16C,
8       mlib_MatrixUnit_S32, mlib_MatrixUnit_S32C - Unit matrix generation
9

SYNOPSIS

11       cc [ flag... ] file... -lmlib [ library... ]
12       #include <mlib.h>
13
14       mlib_status mlib_MatrixUnit_U8(mlib_u8 *z, mlib_s32 n);
15
16
17       mlib_status mlib_MatrixUnit_U8C(mlib_u8 *z, mlib_s32 n);
18
19
20       mlib_status mlib_MatrixUnit_S8(mlib_s8 *z, mlib_s32 n);
21
22
23       mlib_status mlib_MatrixUnit_S8C(mlib_s8 *z, mlib_s32 n);
24
25
26       mlib_status mlib_MatrixUnit_S16(mlib_s16 *z, mlib_s32 n);
27
28
29       mlib_status mlib_MatrixUnit_S16C(mlib_s16 *z, mlib_s32 n);
30
31
32       mlib_status mlib_MatrixUnit_S32(mlib_s32 *z, mlib_s32 n);
33
34
35       mlib_status mlib_MatrixUnit_S32C(mlib_s32 *z, mlib_s32 n);
36
37

DESCRIPTION

39       Each of these functions sets the values for a unit matrix.
40
41
42       For real data, the following equation is used:
43
44         z[i*n + j] = 1  if i == j
45         z[i*n + j] = 0  if i != j
46
47
48
49       where i = 0, 1, ..., (n - 1); j = 0, 1, ..., (n - 1).
50
51
52       For complex data, the following equation is used:
53
54         z[2*(i*n + j)]     = 1  if i == j
55         z[2*(i*n + j)]     = 0  if i != j
56
57         z[2*(i*n + j) + 1] = 0
58
59
60
61       where i = 0, 1, ..., (n - 1); j = 0, 1, ..., (n - 1).
62

PARAMETERS

64       Each of the functions takes the following arguments:
65
66       z    Pointer to the destination matrix.
67
68
69       n    Number of rows and columns in the matrix.
70
71

RETURN VALUES

73       Each  of the functions returns MLIB_SUCCESS if successful. Otherwise it
74       returns MLIB_FAILURE.
75

ATTRIBUTES

77       See attributes(5) for descriptions of the following attributes:
78
79
80
81
82       ┌─────────────────────────────┬─────────────────────────────┐
83       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
84       ├─────────────────────────────┼─────────────────────────────┤
85       │Interface Stability          │Committed                    │
86       ├─────────────────────────────┼─────────────────────────────┤
87       │MT-Level                     │MT-Safe                      │
88       └─────────────────────────────┴─────────────────────────────┘
89

SEE ALSO

91       attributes(5)
92
93
94
95SunOS 5.11                        2 Mar 2007         mlib_MatrixUnit_U8(3MLIB)
Impressum