/
joAbstractFosterLinearOperator.jl
100 lines (85 loc) · 2.77 KB
/
joAbstractFosterLinearOperator.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
############################################################
# joAbstractFosterLinearOperator subtypes ##################
############################################################
############################################################
# joLooseMatrix #################################################
export joLooseMatrix, joLooseMatrixException
# type definition
"""
joLooseMatrix type
# TYPE PARAMETERS
- DDT::DataType : domain DataType
- RDT::DataType : range DataType
# FIELDS
- name::String : given name
- m::Integer : # of rows
- n::Integer : # of columns
- fop::Function : forward matrix
- fop_T::Function : transpose matrix
- fop_A::Function : adjoint matrix
- fop_C::Function : conj matrix
- iop::Nullable{Function} : inverse for fop
- iop_T::Nullable{Function} : inverse for fop_T
- iop_A::Nullable{Function} : inverse for fop_A
- iop_C::Nullable{Function} : inverse for fop_C
"""
struct joLooseMatrix{DDT<:Number,RDT<:Number} <: joAbstractFosterLinearOperator{DDT,RDT}
name::String
m::Integer
n::Integer
fop::Function # forward
fop_T::Function # transpose
fop_A::Function # adjoint
fop_C::Function # conj
iop::Nullable{Function}
iop_T::Nullable{Function}
iop_A::Nullable{Function}
iop_C::Nullable{Function}
end
# type exception
struct joLooseMatrixException <: Exception
msg :: String
end
############################################################
# joLooseLinearFunction ####################################
export joLooseLinearFunction, joLooseLinearFunctionException
# type definition
"""
joLooseLinearFunction type
# TYPE PARAMETERS
- DDT::DataType : domain DataType
- RDT::DataType : range DataType
# FIELDS
- name::String : given name
- m::Integer : # of rows
- n::Integer : # of columns
- fop::Function : forward function
- fop_T::Nullable{Function} : transpose function
- fop_A::Nullable{Function} : adjoint function
- fop_C::Nullable{Function} : conj function
- fMVok : whether fops are rady to handle mvec
- iop::Nullable{Function} : inverse for fop
- iop_T::Nullable{Function} : inverse for fop_T
- iop_A::Nullable{Function} : inverse for fop_A
- iop_C::Nullable{Function} : inverse for fop_C
- iMVok::Bool : whether iops are rady to handle mvec
"""
struct joLooseLinearFunction{DDT<:Number,RDT<:Number} <: joAbstractFosterLinearOperator{DDT,RDT}
name::String
m::Integer
n::Integer
fop::Function # forward
fop_T::Nullable{Function} # transpose
fop_A::Nullable{Function} # adjoint
fop_C::Nullable{Function} # conj
fMVok::Bool # forward can do mvec
iop::Nullable{Function}
iop_T::Nullable{Function}
iop_A::Nullable{Function}
iop_C::Nullable{Function}
iMVok::Bool
end
# type exceptions
struct joLooseLinearFunctionException <: Exception
msg :: String
end