Skip to content
Snippets Groups Projects
Commit 5fdd4935 authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

Abstractify method signatures. Solves #2

parent 7d4d8901
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment