source: git/factory/templates/ftmpl_array.h @ 6881f9b

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