• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

Analitza

  • sources
  • kde-4.14
  • kdeedu
  • analitza
  • analitza
matrix.h
Go to the documentation of this file.
1 /*************************************************************************************
2 * Copyright (C) 2013 by Aleix Pol <aleixpol@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License *
6 * as published by the Free Software Foundation; either version 2 *
7 * of the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
17 *************************************************************************************/
18 
19 #ifndef MATRIX_H
20 #define MATRIX_H
21 
22 #include "object.h"
23 #include "vector.h"
24 
25 namespace Analitza {
26 
27 class Vector;
28 
29 class ANALITZA_EXPORT MatrixRow : public Vector
30 {
31  public:
32  MatrixRow(int size=0);
33  virtual QVariant accept(AbstractExpressionVisitor* e) const;
34 
35  MatrixRow* copy() const;
36 };
37 
38 class ANALITZA_EXPORT Matrix : public Object
39 {
40  public:
41  typedef QVector<Object*>::iterator iterator;
42  typedef QVector<Object*>::const_iterator const_iterator;
43 
44  Matrix();
45  virtual ~Matrix();
46  void appendBranch(Object* o);
47 
48  virtual Object* copy() const;
49  virtual bool matches(const Object* exp, QMap< QString, const Object* >* found) const;
50  virtual QVariant accept(AbstractExpressionVisitor* exp) const;
51  const_iterator constBegin() const { return m_rows.constBegin(); }
52  const_iterator constEnd() const { return m_rows.constEnd(); }
53  iterator begin() { return m_rows.begin(); }
54  iterator end() { return m_rows.end(); }
55  QList< Object* > values() const;
56  bool operator==(const Matrix& m) const;
57  int size() const { return m_rows.size(); }
58  Analitza::Matrix::iterator erase(const Analitza::Matrix::iterator& it) { return m_rows.erase(it); }
59  Object* at(int i, int j) const;
60 
61  private:
62  QVector<Object*> m_rows;
63 };
64 
65 }
66 
67 #endif // MATRIX_H
Analitza::AbstractExpressionVisitor
Definition: abstractexpressionvisitor.h:49
QMap
Analitza::Matrix::size
int size() const
Definition: matrix.h:57
Analitza::Matrix::constBegin
const_iterator constBegin() const
Definition: matrix.h:51
Analitza::MatrixRow
Definition: matrix.h:29
Analitza::Vector
Definition: vector.h:34
Analitza::Matrix
Definition: matrix.h:38
Analitza::Matrix::end
iterator end()
Definition: matrix.h:54
Analitza::Matrix::erase
Analitza::Matrix::iterator erase(const Analitza::Matrix::iterator &it)
Definition: matrix.h:58
Analitza::Matrix::constEnd
const_iterator constEnd() const
Definition: matrix.h:52
QList
Analitza::Object
Definition: object.h:38
object.h
vector.h
QVector
ANALITZA_EXPORT
#define ANALITZA_EXPORT
Definition: analitzaexport.h:31
Analitza::Matrix::begin
iterator begin()
Definition: matrix.h:53
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal