aboutsummaryrefslogtreecommitdiff
path: root/matlab/+types/Vector.m
blob: f5dea9cd1161ada053a637d0d5bec23c625d42a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
classdef Vector < types.List
    methods
        function obj = Vector(varargin)
            obj.data = varargin;
        end

        function ret = slice(obj, start, last)
            if nargin < 3
                last = length(obj.data);
            end
            ret = types.Vector(obj.data{2:end});
        end

        function ret = clone(obj)
            ret = types.Vector();
            ret.data = obj.data;
            ret.meta = obj.meta;
        end
    end
end