Mercurial > octave-nkf
view libinterp/version.in.h @ 20548:96153b16febe
Overhaul Range object in liboctave.
* Range.h (Range (b, l), Range (b, l, i)): For 2- or 3-element form of
constructor, set internal rng_limit equal to actual limit of range object.
* Range.h (set_base, set_limit, set_inc): Change to prototypes only.
Implementation moved to Range.cc
* Range.cc (matrix_value): Return rng_base for first element, rng_limit for
last element.
* Range.cc (checkelem, elem, index): Simplify functions by returning rng_limit
for last element.
* Range.cc (sort_internal (bool), sort_internal (Array<octave_idx_t>, bool)):
Simplify functions by simply swapping rng_base and rng_limit when sorting a
range in the opposite direction.
* Range.cc (operator <<): Simplify function by returning rng_limit for last
element.
* Range.cc (operator >>): Fix input stream operator so a correctly sync'ed
range object is created with the correct rng_limit and rng_numel.
* Range.cc (set_base, set_inc): Update rng_numel by calling numel_internal ()
after changing base or increment so that range object is correctly in sync with
itself. Clip rng_limit to true limit of data after base or inc has been set.
* Range.h (set_limit): Update rng_numel after changing internal rng_limit.
Clip rng_limit to actual limit of range object.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 25 Sep 2015 16:15:14 -0700 |
parents | 4197fc428c7d |
children |
line wrap: on
line source
// %NO_EDIT_WARNING% /* Copyright (C) 1992-2015 John W. Eaton This file is part of Octave. Octave is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Octave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Octave; see the file COPYING. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (octave_version_h) #define octave_version_h 1 #define OCTAVE_VERSION %OCTAVE_VERSION% #define OCTAVE_MAJOR_VERSION %OCTAVE_MAJOR_VERSION% #define OCTAVE_MINOR_VERSION %OCTAVE_MINOR_VERSION% #define OCTAVE_PATCH_VERSION %OCTAVE_PATCH_VERSION% // The "API version" is used as a way of checking that interfaces in the // liboctave and libinterp libraries haven't changed in a backwardly // incompatible way when loading .oct files. A better way to do that is // with library versioning, but not all systems support that. // NOTE: This macro will be removed in a future version of Octave. If // you insist on checking for features using a version number, use the // OCTAVE_MAJOR_VERSION, OCTAVE_MINOR_VERSION, and // OCTAVE_PATCH_VERSION macros instead. #define OCTAVE_API_VERSION %OCTAVE_API_VERSION% #define OCTAVE_RELEASE_DATE %OCTAVE_RELEASE_DATE% #define OCTAVE_COPYRIGHT %OCTAVE_COPYRIGHT% #include <string> extern OCTINTERP_API std::string octave_www_statement (bool html = false); extern OCTINTERP_API std::string octave_contrib_statement (bool html = false); extern OCTINTERP_API std::string octave_bugs_statement (bool html = false); extern OCTINTERP_API std::string octave_name_version_and_copyright (void); extern OCTINTERP_API std::string octave_name_version_copyright_copying_and_warranty (bool html = false, const std::string& extra_info = std::string ()); extern OCTINTERP_API std::string octave_name_version_copyright_copying_warranty_and_bugs (bool html = false, const std::string& extra_info = std::string ()); extern OCTINTERP_API std::string octave_startup_message (bool html = false); #endif