First checkin, AXE release 0.2
[AXE.git] / src / ideas
1 class vector    //  Allocated array of doubles
2
3    vector()     // default dimension: 3
4    vector(int dim)
5    vector(vector &)   // copy constructor
6    ~vector()
7
8
9 class matrix   // Allocated array of vectors
10
11    matrix()  // default 3 x 3
12    matrix(int rows, int cols = 0)
13           // 0 columns: cols = rows, default to square matrix
14    matrix(double)   // numbers on diagonal, rest=0
15    matrix(matrix &)   // copy constructor
16
17    To raise a matrix M to an integer power n:
18       (see DDJ #177, page 86)
19     note that the bits in n represent squares of M
20
21       Result = 1;
22       for (bit = 0; bit < # bits in n; bit ++)
23         if bit in n is set
24            Result *= M;
25         M = M * M;
26
27 class time
28
29    Hours, minutes, seconds  (fractional seconds ?)
30
31    Conversion from HMS to decimal and vice-versa
32
33    time(double)   //  hours
34
35    double()       //  Convert to decimal hours
36
37    operator + -