Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Heyden
LabProcesses.jl
Commits
5fdd4935
Commit
5fdd4935
authored
Aug 23, 2017
by
Fredrik Bagge Carlson
Browse files
Abstractify method signatures. Solves #2
parent
7d4d8901
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/interface_implementations/ballandbeam.jl
View file @
5fdd4935
...
@@ -49,10 +49,10 @@ const AbstractBeamOrBallAndBeam = Union{AbstractBeam, AbstractBallAndBeam}
...
@@ -49,10 +49,10 @@ const AbstractBeamOrBallAndBeam = Union{AbstractBeam, AbstractBallAndBeam}
num_outputs
(
p
::
AbstractBeam
)
=
1
num_outputs
(
p
::
AbstractBeam
)
=
1
num_outputs
(
p
::
AbstractBallAndBeam
)
=
2
num_outputs
(
p
::
AbstractBallAndBeam
)
=
2
num_inputs
(
p
::
AbstractBeamOrBallAndBeam
)
=
1
num_inputs
(
p
::
AbstractBeamOrBallAndBeam
)
=
1
outputrange
(
p
::
Beam
)
=
[(
-
10
,
10
)]
outputrange
(
p
::
AbstractBeam
)
=
[(
-
10
,
10
)]
outputrange
(
p
::
AbstractBallAndBeam
)
=
[(
-
10
,
10
),(
-
1
,
1
)]
# Beam angle, Ball position
outputrange
(
p
::
AbstractBallAndBeam
)
=
[(
-
10
,
10
),(
-
1
,
1
)]
# Beam angle, Ball position
inputrange
(
p
::
AbstractBeamOrBallAndBeam
)
=
[(
-
10
,
10
)]
inputrange
(
p
::
AbstractBeamOrBallAndBeam
)
=
[(
-
10
,
10
)]
isstable
(
p
::
Beam
)
=
true
isstable
(
p
::
AbstractBeam
)
=
true
isstable
(
p
::
AbstractBallAndBeam
)
=
false
isstable
(
p
::
AbstractBallAndBeam
)
=
false
isasstable
(
p
::
AbstractBeamOrBallAndBeam
)
=
false
isasstable
(
p
::
AbstractBeamOrBallAndBeam
)
=
false
sampletime
(
p
::
AbstractBeamOrBallAndBeam
)
=
p
.
h
sampletime
(
p
::
AbstractBeamOrBallAndBeam
)
=
p
.
h
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment