source: git/factory/templates/ftmpl_array.h @ 175e355

spielwiese
Last change on this file since 175e355 was 175e355, checked in by Jens Schmidt <schmidt@…>, 27 years ago
stream-io wrapped by NOSTREAMIO git-svn-id: file:///usr/local/Singular/svn/trunk@114 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.1 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2// $Id: ftmpl_array.h,v 1.2 1997-03-27 10:29:30 schmidt Exp $
3
4#ifndef INCL_ARRAY_H
5#define INCL_ARRAY_H
6
7/*
8$Log: not supported by cvs2svn $
9Revision 1.1  1996/07/16 12:24:57  stobbe
10"operators += and *= deleted sincethey are not needed in an general
11array class als well as the functions sum, prod, crossprod.
12"
13
14Revision 1.0  1996/05/17 11:06:32  stobbe
15Initial revision
16
17*/
18
19#ifndef NOSTREAMIO
20#include <iostream.h>
21#endif /* NOSTREAMIO */
22
23template <class T>
24class Array {
25private:
26    T * data;
27    int _min;
28    int _max;
29    int _size;
30public:
31    Array();
32    Array( const Array<T>& );
33    Array( int size );
34    Array( int min, int max );
35    ~Array();
36    Array<T>& operator= ( const Array<T>& );
37    T& operator[] ( int i ) const;
38    int size() const;
39    int min() const;
40    int max() const;
41#ifndef NOSTREAMIO
42    void print ( ostream& ) const;
43#endif /* NOSTREAMIO */
44};
45
46#ifndef NOSTREAMIO
47template <class T>
48ostream& operator<< ( ostream & os, const Array<T> & a );
49#endif /* NOSTREAMIO */
50
51#endif /* INCL_ARRAY_H */
Note: See TracBrowser for help on using the repository browser.