Skip to content

Commit

Permalink
Change immutable to struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoolen committed Mar 25, 2017
1 parent 52d109e commit 43343c9
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion gen/SimpleSymbolic.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module SimpleSymbolic

immutable S
struct S
x::Any
end

Expand Down
8 changes: 4 additions & 4 deletions src/angleaxis_types.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
################################################################################
"""
immutable AngleAxis{T} <: Rotation{3,T}
struct AngleAxis{T} <: Rotation{3,T}
AngleAxis(Θ, x, y, z)
A 3×3 rotation matrix parameterized by a 3D rotation by angle θ about an
Expand All @@ -11,7 +11,7 @@ Note that the axis is not unique for θ = 0, and that this parameterization does
not continuously map the neighbourhood of the null rotation (and therefore
might not be suitable for autodifferentation and optimization purposes).
"""
immutable AngleAxis{T} <: Rotation{3,T}
struct AngleAxis{T} <: Rotation{3,T}
theta::T
axis_x::T
axis_y::T
Expand Down Expand Up @@ -113,14 +113,14 @@ end
################################################################################
################################################################################
"""
immutable RodriguesVec{T} <: Rotation{3,T}
struct RodriguesVec{T} <: Rotation{3,T}
RodriguesVec(sx, sy, sz)
Rodrigues vector parameterization of a 3×3 rotation matrix. The direction of the
vector [sx, sy, sz] defines the axis of rotation, and the rotation angle is
given by its norm.
"""
immutable RodriguesVec{T} <: Rotation{3,T}
struct RodriguesVec{T} <: Rotation{3,T}
sx::T
sy::T
sz::T
Expand Down
4 changes: 2 additions & 2 deletions src/core_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ end
################################################################################
################################################################################
"""
immutable RotMatrix{N,T} <: Rotation{N,T}
struct RotMatrix{N,T} <: Rotation{N,T}
A statically-sized, N×N unitary (orthogonal) matrix.
Note: the orthonormality of the input matrix is *not* checked by the constructor.
"""
immutable RotMatrix{N,T,L} <: Rotation{N,T} # which is <: AbstractMatrix{T}
struct RotMatrix{N,T,L} <: Rotation{N,T} # which is <: AbstractMatrix{T}
mat::SMatrix{N, N, T, L} # The final parameter to SMatrix is the "length" of the matrix, 3 × 3 = 9
end

Expand Down
Loading

0 comments on commit 43343c9

Please sign in to comment.