Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[8e00e8]: src / ov-base-fixed-mat.h Maximize Restore History

Download this file

ov-base-fixed-mat.h    112 lines (72 with data), 2.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
/*
Copyright (C) 2003 Motorola Inc
Copyright (C) 2003 David Bateman
This program 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 2, or (at your option) any
later version.
This program 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 this program; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>.
In addition to the terms of the GPL, you are permitted to link
this program with any Open Source program, as defined by the
Open Source Initiative (www.opensource.org)
*/
#if !defined (octave_base_fixed_mat_h)
#define octave_base_fixed_mat_h 1
#include <cstdlib>
#include <iostream>
#include <string>
#include <octave/mx-base.h>
#include <octave/str-vec.h>
#include <octave/error.h>
#include <octave/ov-base.h>
#include <octave/ov-typeinfo.h>
class octave_value_list;
template <class MT>
class
octave_base_fixed_matrix : public octave_base_value
{
public:
octave_base_fixed_matrix (void)
: octave_base_value () { }
octave_base_fixed_matrix (const MT& m)
: octave_base_value (), matrix (m) { }
octave_base_fixed_matrix (const octave_base_fixed_matrix& m)
: octave_base_value (), matrix (m.matrix) { }
~octave_base_fixed_matrix (void) { }
octave_value subsref (const std::string& type,
const std::list<octave_value_list>& idx);
octave_value_list subsref (const std::string& type,
const std::list<octave_value_list>& idx, int)
{ return subsref (type, idx); }
octave_value_list dotref (const octave_value_list& idx);
void assign (const octave_value_list& idx, const MT& rhs);
dim_vector dims (void) const { return matrix.dims (); }
size_t byte_size (void) const { return matrix.byte_size (); }
octave_value all (int dim = 0) const { return matrix.all (dim); }
octave_value any (int dim = 0) const { return matrix.any (dim); }
bool is_matrix_type (void) const { return true; }
bool is_numeric_type (void) const { return true; }
bool is_defined (void) const { return true; }
bool is_constant (void) const { return true; }
bool is_true (void) const;
bool is_map (void) const { return true; }
bool valid_as_scalar_index (void) const;
virtual bool print_as_scalar (void) const;
void print (std::ostream& os, bool pr_as_read_syntax = false) const;
bool print_name_tag (std::ostream& os, const std::string& name) const;
void print_info (std::ostream& os, const std::string& prefix) const;
protected:
MT matrix;
};
#endif
/*
;;; Local Variables: ***
;;; mode: C++ ***
;;; End: ***
*/