source: git/factory/templates/ftmpl_array.h @ 8c0163

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