source: git/factory/templates/ftmpl_array.h @ 9f2b6f

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