7
7
julia> x = [1, 2, 3];
8
8
9
9
julia> KernelFunctions.MOInputIsotopicByFeatures(x, 2)
10
- 6-element KernelFunctions.MOInputIsotopicByFeatures{Int64, Vector{Int64}}:
10
+ 6-element KernelFunctions.MOInputIsotopicByFeatures{Int64, Vector{Int64}, Int64 }:
11
11
(1, 1)
12
12
(1, 2)
13
13
(2, 1)
@@ -24,9 +24,10 @@ The first `out_dim` elements represent all outputs for the first input, the seco
24
24
25
25
See [Inputs for Multiple Outputs](@ref) in the docs for more info.
26
26
"""
27
- struct MOInputIsotopicByFeatures{S,T<: AbstractVector{S} } <: AbstractVector{Tuple{S,Int}}
27
+ struct MOInputIsotopicByFeatures{S,T<: AbstractVector{S} ,Tout_dim<: Integer } < :
28
+ AbstractVector{Tuple{S,Int}}
28
29
x:: T
29
- out_dim:: Integer
30
+ out_dim:: Tout_dim
30
31
end
31
32
32
33
"""
38
39
julia> x = [1, 2, 3];
39
40
40
41
julia> KernelFunctions.MOInputIsotopicByOutputs(x, 2)
41
- 6-element KernelFunctions.MOInputIsotopicByOutputs{Int64, Vector{Int64}}:
42
+ 6-element KernelFunctions.MOInputIsotopicByOutputs{Int64, Vector{Int64}, Int64 }:
42
43
(1, 1)
43
44
(2, 1)
44
45
(3, 1)
@@ -53,9 +54,10 @@ As shown above, an `MOInputIsotopicByOutputs` represents a vector of tuples.
53
54
The first `length(x)` elements represent the inputs for the first output, the second
54
55
`length(x)` elements represent the inputs for the second output, etc.
55
56
"""
56
- struct MOInputIsotopicByOutputs{S,T<: AbstractVector{S} } <: AbstractVector{Tuple{S,Int}}
57
+ struct MOInputIsotopicByOutputs{S,T<: AbstractVector{S} ,Tout_dim<: Integer } < :
58
+ AbstractVector{Tuple{S,Int}}
57
59
x:: T
58
- out_dim:: Integer
60
+ out_dim:: Tout_dim
59
61
end
60
62
61
63
const IsotopicMOInputsUnion = Union{MOInputIsotopicByFeatures,MOInputIsotopicByOutputs}
@@ -96,7 +98,7 @@ A data type to accommodate modelling multi-dimensional output data.
96
98
julia> x = [1, 2, 3];
97
99
98
100
julia> MOInput(x, 2)
99
- 6-element KernelFunctions.MOInputIsotopicByOutputs{Int64, Vector{Int64}}:
101
+ 6-element KernelFunctions.MOInputIsotopicByOutputs{Int64, Vector{Int64}, Int64 }:
100
102
(1, 1)
101
103
(2, 1)
102
104
(3, 1)
@@ -136,7 +138,7 @@ julia> Y = [1.1 2.1 3.1; 1.2 2.2 3.2]
136
138
julia> inputs, outputs = prepare_isotopic_multi_output_data(x, ColVecs(Y));
137
139
138
140
julia> inputs
139
- 6-element KernelFunctions.MOInputIsotopicByFeatures{Float64, Vector{Float64}}:
141
+ 6-element KernelFunctions.MOInputIsotopicByFeatures{Float64, Vector{Float64}, Int64 }:
140
142
(1.0, 1)
141
143
(1.0, 2)
142
144
(2.0, 1)
@@ -184,7 +186,7 @@ julia> Y = [1.1 1.2; 2.1 2.2; 3.1 3.2]
184
186
julia> inputs, outputs = prepare_isotopic_multi_output_data(x, RowVecs(Y));
185
187
186
188
julia> inputs
187
- 6-element KernelFunctions.MOInputIsotopicByOutputs{Float64, Vector{Float64}}:
189
+ 6-element KernelFunctions.MOInputIsotopicByOutputs{Float64, Vector{Float64}, Int64 }:
188
190
(1.0, 1)
189
191
(2.0, 1)
190
192
(3.0, 1)
0 commit comments