GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ov-cs-list.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2002-2017 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_ov_cs_list_h)
24 #define octave_ov_cs_list_h 1
25 
26 #include "octave-config.h"
27 
28 #include <cstdlib>
29 
30 #include <iosfwd>
31 #include <string>
32 
33 #include "mx-base.h"
34 #include "str-vec.h"
35 
36 #include "Cell.h"
37 #include "error.h"
38 #include "ovl.h"
39 #include "ov-typeinfo.h"
40 
41 class tree_walker;
42 
43 // Lists.
44 
45 class
47 {
48 public:
49 
51  : octave_base_value (), lst () { }
52 
54  : octave_base_value (), lst (l) { }
55 
56  octave_cs_list (const Cell& c);
57 
59  : octave_base_value (), lst (l.lst) { }
60 
61  ~octave_cs_list (void) { }
62 
63  octave_base_value *clone (void) const { return new octave_cs_list (*this); }
64  octave_base_value *empty_clone (void) const { return new octave_cs_list (); }
65 
66  dim_vector dims (void) const { return dim_vector (1, lst.length ()); }
67 
68  bool is_defined (void) const { return true; }
69 
70  bool is_constant (void) const { return true; }
71 
72  bool is_cs_list (void) const { return true; }
73 
74  octave_value_list list_value (void) const { return lst; }
75 
77  const std::list<octave_value_list>& idx);
78 
80  const std::list<octave_value_list>& idx, int);
81 
82 private:
83 
84  // The list of Octave values.
86 
88 };
89 
90 #endif
Definition: Cell.h:37
~octave_cs_list(void)
Definition: ov-cs-list.h:61
octave_cs_list(const octave_cs_list &l)
Definition: ov-cs-list.h:58
octave_base_value * empty_clone(void) const
Definition: ov-cs-list.h:64
octave_base_value * clone(void) const
Definition: ov-cs-list.h:63
idx subsref(val, idx) esult
Definition: ov.cc:3080
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:148
octave_value_list list_value(void) const
Definition: ov-cs-list.h:74
octave_value_list lst
Definition: ov-cs-list.h:85
bool is_cs_list(void) const
Definition: ov-cs-list.h:72
idx type
Definition: ov.cc:3129
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
octave_cs_list(void)
Definition: ov-cs-list.h:50
octave_cs_list(const octave_value_list &l)
Definition: ov-cs-list.h:53
bool is_constant(void) const
Definition: ov-cs-list.h:70
bool is_defined(void) const
Definition: ov-cs-list.h:68
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:854
dim_vector dims(void) const
Definition: ov-cs-list.h:66