67 return value(summed.a, x)+value(summed.b, x) |
67 return value(summed.a, x)+value(summed.b, x) |
68 end |
68 end |
69 |
69 |
70 # Squared norm of a differentiable function as a differentiable function |
70 # Squared norm of a differentiable function as a differentiable function |
71 |
71 |
72 ℝ = Float64 |
72 const ℝ = Float64 |
73 ℝⁿ = Vector{Float64} |
73 const ℝⁿ = Vector{Float64} |
74 |
74 |
75 struct Squared <: DiffF{ℝⁿ, ℝ, MatrixOp{ℝ}} |
75 struct Squared <: DiffF{ℝⁿ, ℝ, MatrixOp{ℝ}} |
76 r :: DiffF{ℝⁿ, ℝⁿ, MatrixOp{ℝ}} |
76 r :: DiffF{ℝⁿ, ℝⁿ, MatrixOp{ℝ}} |
77 end |
77 end |
78 |
78 |