GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
op-pm-template.cc
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2008-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if defined (HAVE_CONFIG_H)
27# include "config.h"
28#endif
29
30// FIXME: it might be nice to only include the declarations of the
31// operators that are actually needed instead of including all of them.
32#include "mx-ops.h"
33
34#include "ov-perm.h"
35#include MINCLUDE
36#include "ops.h"
37#if defined (DEFINENULLASSIGNCONV)
38# include "ov-null-mat.h"
39#endif
40
41#if ! defined (LDMATRIX)
42# define LDMATRIX LMATRIX
43#endif
44
46
47#define OCTAVE_LMATRIX CONCAT2(octave_, LMATRIX)
48#define OCTAVE_LDMATRIX CONCAT2(octave_, LDMATRIX)
49#define OCTAVE_RMATRIX CONCAT2(octave_, RMATRIX)
50#if defined (LEFT)
51# define LMATRIX_VALUE perm_matrix_value
52# define RMATRIX_VALUE CONCAT2(RMATRIX, _value)
53#else
54# define LMATRIX_VALUE CONCAT2(LMATRIX, _value)
55# define RMATRIX_VALUE perm_matrix_value
56#endif
57
59{
62
63 return v1.LMATRIX_VALUE () * v2.RMATRIX_VALUE ();
64}
65
66#if defined (LEFT)
68{
71
72 return v1.perm_matrix_value ().inverse () * v2.RMATRIX_VALUE ();
73}
74#else
76{
79
80 return v1.LMATRIX_VALUE () * v2.perm_matrix_value ().inverse ();
81}
82#endif
83
84#define SHORT_NAME CONCAT3(LSHORT, _, RSHORT)
85#define INST_NAME CONCAT3(install_, SHORT_NAME, _ops)
86
87void
102
103OCTAVE_END_NAMESPACE(octave)
PermMatrix inverse() const
virtual PermMatrix perm_matrix_value() const
Definition ov-base.cc:739
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define RMATRIX
Definition op-cdm-cm.cc:34
#define LMATRIX
Definition op-cdm-cm.cc:33
const octave_base_value & a2
const octave_char_matrix & v2
#define INST_NAME
#define OCTAVE_LDMATRIX
#define OCTAVE_LMATRIX
#define OCTAVE_RMATRIX
#define DEFBINOP(name, t1, t2)
Definition ops.h:248
#define INSTALL_ASSIGNCONV_TI(ti, t1, t2, tr)
Definition ops.h:88
#define OCTAVE_CAST_BASE_VALUE(T, T_VAL, BASE_VAL)
Definition ops.h:52
#define INSTALL_BINOP_TI(ti, op, t1, t2, f)
Definition ops.h:70
octave_value op_mul(const octave_value &a1, const octave_value &a2)
Definition ov.h:1680
octave_value op_ldiv(const octave_value &a1, const octave_value &a2)
Definition ov.h:1684
octave_value op_div(const octave_value &a1, const octave_value &a2)
Definition ov.h:1681