Skip to content

Commit

Permalink
Octave API: Added support for interval arithmetic libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
oheim committed Nov 12, 2015
1 parent a9d0a69 commit 35fbfdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion client-api/Octave/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Description: VIBes is a visualization system that aims at providing people
program to communicate with the viewer in order to draw figures.

This package integrates the VIBes API into Octave. The VIBes application
is required for operation and must be installed seperately.
is required for operation and must be installed seperately. Data types from
third-party interval arithmetic libraries for Octave are also supportd.
Depends: octave (>= 4.0.0)
License: GPLv3+
2 changes: 1 addition & 1 deletion client-api/Octave/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ run: $(INSTALLED_PACKAGE)
.PHONY: clean

clean:
rm -f \
rm -rf \
"$(PACKAGE)-*.tar" \
"$(PACKAGE)-*.tar.gz" \
"$(HTML_DIR)" \
Expand Down
12 changes: 10 additions & 2 deletions client-api/Octave/inst/+vibes/drawBox.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
## -*- texinfo -*-
## @documentencoding UTF-8
## @deftypefn {Function File} {} vibes.drawBox (@var{box})
## Plot a single box with pairs of lower bounds and upper bounds. The matrix
## @var{box} must be of size either @option{[2 @var{n}]} or
## Plot a single box with pairs of lower bounds and upper bounds.
##
## The matrix @var{box} must be of size either @option{[2 @var{n}]} or
## @option{[@var{n} 2]}, where @var{n} is the number of axes.
##
## Alternatively @var{box} may be an interval vector.
## @end deftypefn
##
## @deftypefn {Function File} {} vibes.drawBox (@var{x_lb}, @var{x_ub}, @var{y_lb}, @var{y_ub})
Expand All @@ -42,6 +45,11 @@ function drawBox (varargin)
print_usage ();
endif

if (any (isa (varargin{1}, {'infsup', 'intval'})))
varargin{1} = horzcat (vec (inf (varargin{1})), ...
vec (sup (varargin{1})));
endif

__vibes__ ('drawBox', varargin{:});

endfunction

0 comments on commit 35fbfdc

Please sign in to comment.