~jtaylor/ubuntu/precise/python-numpy/multiarch-fix-818867

« back to all changes in this revision

Viewing changes to numpy/doc/swig/test/Array2.h

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik, Riku Voipio, Tiziano Zito, Carlos Galisteo, Ondrej Certik
  • Date: 2008-07-08 15:08:16 UTC
  • mfrom: (0.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080708150816-ekf992jcp2k1eua3
Tags: 1:1.1.0-3
[ Riku Voipio ]
* debian/control: atlas is not available on armel, and after a quick look
  neither on alpha. I'd also suggest dropping
  libatlas-sse-dev|libatlas-sse2-dev|libatlas-3dnow-dev alternative combo
  away, these are potentially dangerous on buildd's. Ondrej: dropped.
  (Closes: #489568)

[ Tiziano Zito ]
* patch: build _dotblas.c when ATLAS is not installed, build-conflict with
  atlas, build-depend on blas+lapack only, as it used to be (Closes: #489726)

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

[ Ondrej Certik ]
* Checked the package on i386 and amd64, both with and without atlas, all
  tests run and the numpy package is faster if atlas is around. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef ARRAY2_H
 
2
#define ARRAY2_H
 
3
 
 
4
#include "Array1.h"
 
5
#include <stdexcept>
 
6
#include <string>
 
7
 
 
8
class Array2
 
9
{
 
10
public:
 
11
 
 
12
  // Default constructor
 
13
  Array2();
 
14
 
 
15
  // Size/array constructor
 
16
  Array2(int nrows, int ncols, long* data=0);
 
17
 
 
18
  // Copy constructor
 
19
  Array2(const Array2 & source);
 
20
 
 
21
  // Destructor
 
22
  ~Array2();
 
23
 
 
24
  // Assignment operator
 
25
  Array2 & operator=(const Array2 & source);
 
26
 
 
27
  // Equals operator
 
28
  bool operator==(const Array2 & other) const;
 
29
 
 
30
  // Length accessors
 
31
  int nrows() const;
 
32
  int ncols() const;
 
33
 
 
34
  // Resize array
 
35
  void resize(int ncols, int nrows, long* data=0);
 
36
 
 
37
  // Set item accessor
 
38
  Array1 & operator[](int i);
 
39
 
 
40
  // Get item accessor
 
41
  const Array1 & operator[](int i) const;
 
42
 
 
43
  // String output
 
44
  std::string asString() const;
 
45
 
 
46
  // Get view
 
47
  void view(int* nrows, int* ncols, long** data) const;
 
48
 
 
49
private:
 
50
  // Members
 
51
  bool _ownData;
 
52
  int _nrows;
 
53
  int _ncols;
 
54
  long * _buffer;
 
55
  Array1 * _rows;
 
56
 
 
57
  // Methods
 
58
  void allocateMemory();
 
59
  void allocateRows();
 
60
  void deallocateMemory();
 
61
};
 
62
 
 
63
#endif