@@ -17,8 +17,18 @@ struct ParameterIndex{P, B, I}
1717 validate_size:: Bool
1818end
1919
20- ParameterIndex (portion, idx, val = false ) = ParameterIndex {typeof(portion), idx[1], typeof(idx)} (portion, idx, val)
21- ParameterIndex (portion:: Union{SciMLStructures.Tunable, SciMLStructures.Initials} , idx, val = false ) = ParameterIndex {typeof(portion), idx, typeof(idx)} (portion, idx, val)
20+ function ParameterIndex (portion, idx, val = false )
21+ ParameterIndex {typeof(portion), idx[1], typeof(idx)} (portion, idx, val)
22+ end
23+ function ParameterIndex (portion:: Union{SciMLStructures.Tunable, SciMLStructures.Initials} ,
24+ idx, val = false )
25+ ParameterIndex {typeof(portion), idx, typeof(idx)} (portion, idx, val)
26+ end
27+ function ParameterIndex (portion:: Union{SciMLStructures.Tunable, SciMLStructures.Initials} ,
28+ idx:: AbstractArray , val = false )
29+ idx = Origin (first .(axes (idx)))(SArray {Tuple{size(idx)...}} (idx))
30+ ParameterIndex {typeof(portion), idx, typeof(idx)} (portion, idx, val)
31+ end
2232ParameterIndex (p:: ParameterIndex ) = ParameterIndex (p. portion, p. idx, false )
2333
2434struct DiscreteIndex
0 commit comments