-
Notifications
You must be signed in to change notification settings - Fork 0
/
vandermonde.c
executable file
·1123 lines (797 loc) · 22.4 KB
/
vandermonde.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# include <stdlib.h>
# include <stdio.h>
# include <math.h>
# include <time.h>
# include "vandermonde.h"
/******************************************************************************/
double *bivand1 ( int n, double alpha[], double beta[] )
/******************************************************************************/
/*
Purpose:
BIVAND1 returns a bidimensional Vandermonde1 matrix.
Discussion:
N = 3, ALPHA = ( 1, 2, 3 ), BETA = ( 10, 20, 30 )
(x,y) | (1,10) (2,10) (3,10) (1,20) (2,20) (1,30)
--------+-----------------------------------------------
1 | 1 1 1 1 1 1
x | 1 2 3 1 2 1
y | 10 10 10 20 20 30
x^2 | 1 4 9 1 4 1
x y | 10 20 30 20 40 30
x^2y^2 | 100 100 100 400 400 900
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
23 February 2014
Author:
John Burkardt
Parameters:
Input, int N, the order of the data vectors.
Input, double ALPHA[N], BETA[N], the values that define A.
Output, double BIVAND1[((N+1)*N)/2*((N+1)*N)/2], the matrix.
*/
{
double *a;
int e;
int e1;
int e2;
int i1;
int i2;
int ii;
int j1;
int j2;
int jj;
int n2;
n2 = ( n * ( n + 1 ) ) / 2;
a = ( double * ) malloc ( n2 * n2 * sizeof ( double ) );
e1 = 0;
e2 = 0;
e = 0;
for ( ii = 0; ii < n2; ii++ )
{
j1 = 0;
j2 = 0;
for ( jj = 0; jj < n2; jj++ )
{
if ( ii == 0 )
{
a[ii+jj*n2] = 1.0;
}
else
{
a[ii+jj*n2] = pow ( alpha[j1], e1 ) * pow ( beta[j2], e2 );
}
if ( j1 + j2 < n - 1 )
{
j1 = j1 + 1;
}
else
{
j1 = 0;
j2 = j2 + 1;
}
}
if ( e2 < e )
{
e1 = e1 - 1;
e2 = e2 + 1;
}
else
{
e = e + 1;
e1 = e;
e2 = 0;
}
}
return a;
}
/******************************************************************************/
double *bivand2 ( int n, double alpha[], double beta[] )
/******************************************************************************/
/*
Purpose:
BIVAND2 returns a bidimensional Vandermonde1 matrix.
Discussion:
N = 3, ALPHA = ( 1, 2, 3 ), BETA = ( 10, 20, 30 )
(x,y) | (1,10) (2,10) (3,10) (1,20) (2,20) (3,20) (1,30) (2,30) (3,30)
--------+---------------------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1
x | 1 2 3 1 2 1 1 2 3
x^2 | 1 4 9 1 4 1 1 4 9
y | 10 10 10 20 20 20 30 30 30
x y | 10 20 30 20 40 60 30 60 90
x^2y | 10 40 90 20 80 180 30 120 270
y^2 | 100 100 100 400 400 400 900 900 900
x y^2 | 100 200 300 400 800 1200 900 1800 2700
x^2y^2 | 100 400 900 400 1600 3600 900 3600 8100
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
01 May 2014
Author:
John Burkardt
Parameters:
Input, int N, the order of the data vectors.
Input, double ALPHA[N], BETA[N], the values that define A.
Output, double BIVAND2[(N*N)*(N*N)], the matrix.
*/
{
double *a;
int i;
int ix;
int iy;
int j;
int jx;
int jy;
a = ( double * ) malloc ( n * n * n * n * sizeof ( double ) );
i = 0;
for ( iy = 0; iy < n; iy++ )
{
for ( ix = 0; ix < n; ix++ )
{
j = 0;
for ( jy = 0; jy < n; jy++ )
{
for ( jx = 0; jx < n; jx++ )
{
a[i+j*n*n] = pow ( alpha[jx], ix ) * pow ( beta[jy], iy );
j = j + 1;
}
}
i = i + 1;
}
}
return a;
}
/******************************************************************************/
double *dvand ( int n, double alpha[], double b[] )
/******************************************************************************/
/*
Purpose:
DVAND solves a Vandermonde system A' * x = b.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
23 February 2014
Author:
John Burkardt
Reference:
Ake Bjorck, Victor Pereyra,
Solution of Vandermonde Systems of Equations,
Mathematics of Computation,
Volume 24, Number 112, October 1970, pages 893-903.
Parameters:
Input, int N, the order of the matrix.
Input, double ALPHA[N], the parameters that define the matrix.
The values should be distinct.
Input, double B[N], the right hand side of the linear system.
Output, double DVAND[N], the solution of the linear system.
*/
{
int j;
int k;
double *x;
x = r8vec_copy_new ( n, b );
for ( k = 0; k < n - 1; k++ )
{
for ( j = n - 1; k < j; j-- )
{
x[j] = ( x[j] - x[j-1] ) / ( alpha[j] - alpha[j-k-1] );
}
}
for ( k = n - 2; 0 <= k; k-- )
{
for ( j = k; j < n - 1; j++ )
{
x[j] = x[j] - alpha[k] * x[j+1];
}
}
return x;
}
/******************************************************************************/
void dvandprg ( int n, double alpha[], double b[], double x[], double c[],
double m[] )
/******************************************************************************/
/*
Purpose:
DVANDPRG solves a Vandermonde system A' * x = f progressively.
Discussion:
This function receives the solution to the system of equations A' * x = f
where A is a Vandermonde matrix for alpha(0) through alpha(n-1),
and new values alpha(n) and f(n). It updates the solution.
To solve a system of Nbig equations, this function may be called
repeatedly, with N = 1, 2, ..., Nbig. Each time, a solution to the
current subsystem is returned.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
18 April 2014
Author:
John Burkardt
Reference:
Ake Bjorck, Victor Pereyra,
Solution of Vandermonde Systems of Equations,
Mathematics of Computation,
Volume 24, Number 112, October 1970, pages 893-903.
Parameters:
Input, int N, the new order of the matrix, which is 1
larger than on the previous call. For the first call, N must be 1.
Input, double ALPHA[N], the parameters that define the matrix.
The values should be distinct. The value ALPHA(N) has just been
added to the system.
Input, double B[N], the right hand side of the linear system.
Input/output, double X[N]. On input, the first N-1 entries
contain the solution of the N-1xN-1 linear system. On output, the
solution to the NxN linear system.
Input/output, double C[N], M[N]. On input, the first N-1
entries contain factorization data for the N-1xN-1 linear system. On
output, factorization data for the NxN linear system.
*/
{
double cn;
int j;
c[n-1] = b[n-1];
for ( j = n - 1; 1 <= j; j-- )
{
c[j-1] = ( c[j] - c[j-1] ) / ( alpha[n-1] - alpha[j-1] );
}
if ( n == 1 )
{
m[n-1] = 1.0;
}
else
{
m[n-1] = 0.0;
}
cn = c[0];
x[n-1] = c[0];
for ( j = n - 1; 1 <= j; j-- )
{
m[j] = m[j] - alpha[n-2] * m[j-1];
x[n-j-1] = x[n-j-1] + m[j] * cn;
}
return;
}
/******************************************************************************/
double *pvand ( int n, double alpha[], double b[] )
/******************************************************************************/
/*
Purpose:
PVAND solves a Vandermonde system A * x = b.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
23 February 2014
Author:
John Burkardt
Reference:
Ake Bjorck, Victor Pereyra,
Solution of Vandermonde Systems of Equations,
Mathematics of Computation,
Volume 24, Number 112, October 1970, pages 893-903.
Parameters:
Input, int N, the order of the matrix.
Input, double ALPHA[N], the parameters that define the matrix.
The values should be distinct.
Input, double B[N], the right hand side of the linear system.
Output, double PVAND[N], the solution of the linear system.
*/
{
int j;
int k;
double *x;
x = r8vec_copy_new ( n, b );
for ( k = 0; k < n - 1; k++ )
{
for ( j = n - 1; k < j; j-- )
{
x[j] = x[j] - alpha[k] * x[j-1];
}
}
for ( k = n - 2; 0 <= k; k-- )
{
for ( j = k + 1; j < n; j++ )
{
x[j] = x[j] / ( alpha[j] - alpha[j-k-1] );
}
for ( j = k; j < n - 1; j++ )
{
x[j] = x[j] - x[j+1];
}
}
return x;
}
/******************************************************************************/
void pvandprg ( int n, double alpha[], double b[], double x[], double d[],
double u[] )
/******************************************************************************/
/*
Purpose:
PVANDPRG solves a Vandermonde system A * x = f progressively.
Discussion:
This function receives the solution to the system of equations A * x = f
where A is a Vandermonde matrix for alpha(0) through alpha(n-1),
and new values alpha(n) and f(n). It updates the solution.
To solve a system of Nbig equations, this function may be called
repeatedly, with N = 1, 2, ..., Nbig. Each time, a solution to the
current subsystem is returned.
Note that the reference, which lists an Algol version of this algorithm,
omits a minus sign, writing
u[j] := u[j] x delta;
where
u[j] := - u[j] x delta;
is actually necessary.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
18 April 2014
Author:
John Burkardt
Reference:
Ake Bjorck, Victor Pereyra,
Solution of Vandermonde Systems of Equations,
Mathematics of Computation,
Volume 24, Number 112, October 1970, pages 893-903.
Parameters:
Input, int N, the new order of the matrix, which is 1
larger than on the previous call. For the first call, N must be 1.
Input, double ALPHA[N], the parameters that define the matrix.
The values should be distinct. The value ALPHA(N) has just been
added to the system.
Input, double B[N], the right hand side of the linear system.
Input/output, double X[N]; on input, the solution of the
N-1xN-1 linear system. On output, the solution of the NxN linear system.
Input/output, double D[N], U[N]; on input, factorization data
for the N-1xN-1 linear system. On output, factorization data for the
NxN linear system.
*/
{
double delta;
double dn;
int j;
d[n-1] = b[n-1];
for ( j = n - 1; 1 <= j; j-- )
{
d[j-1] = d[j] - alpha[n-j-1] * d[j-1];
}
dn = d[0];
u[n-1] = 1.0;
for ( j = 1; j <= n - 1; j++ )
{
delta = alpha[n-1] - alpha[j-1];
u[j-1] = - u[j-1] * delta;
u[n-1] = u[n-1] * delta;
x[j-1] = x[j-1] + dn / u[j-1];
}
x[n-1] = dn / u[n-1];
return;
}
/******************************************************************************/
double *r8mat_mtv_new ( int m, int n, double a[], double x[] )
/******************************************************************************/
/*
Purpose:
R8MAT_MTV_NEW multiplies a transposed matrix times a vector.
Discussion:
An R8MAT is a doubly dimensioned array of R8 values, stored as a vector
in column-major order.
For this routine, the result is returned as the function value.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
26 August 2011
Author:
John Burkardt
Parameters:
Input, int M, N, the number of rows and columns of the matrix.
Input, double A[M,N], the M by N matrix.
Input, double X[M], the vector to be multiplied by A.
Output, double R8MAT_MTV_NEW[N], the product A'*X.
*/
{
int i;
int j;
double *y;
y = ( double * ) malloc ( n * sizeof ( double ) );
for ( j = 0; j < n; j++ )
{
y[j] = 0.0;
for ( i = 0; i < m; i++ )
{
y[j] = y[j] + a[i+j*m] * x[i];
}
}
return y;
}
/******************************************************************************/
double *r8mat_mv_new ( int m, int n, double a[], double x[] )
/******************************************************************************/
/*
Purpose:
R8MAT_MV_NEW multiplies a matrix times a vector.
Discussion:
An R8MAT is a doubly dimensioned array of R8 values, stored as a vector
in column-major order.
For this routine, the result is returned as the function value.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
11 April 2007
Author:
John Burkardt
Parameters:
Input, int M, N, the number of rows and columns of the matrix.
Input, double A[M,N], the M by N matrix.
Input, double X[N], the vector to be multiplied by A.
Output, double R8MAT_MV_NEW[M], the product A*X.
*/
{
int i;
int j;
double *y;
y = ( double * ) malloc ( m * sizeof ( double ) );
for ( i = 0; i < m; i++ )
{
y[i] = 0.0;
for ( j = 0; j < n; j++ )
{
y[i] = y[i] + a[i+j*m] * x[j];
}
}
return y;
}
/******************************************************************************/
void r8mat_print ( int m, int n, double a[], char *title )
/******************************************************************************/
/*
Purpose:
R8MAT_PRINT prints an R8MAT.
Discussion:
An R8MAT is a doubly dimensioned array of R8 values, stored as a vector
in column-major order.
Entry A(I,J) is stored as A[I+J*M]
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
28 May 2008
Author:
John Burkardt
Parameters:
Input, int M, the number of rows in A.
Input, int N, the number of columns in A.
Input, double A[M*N], the M by N matrix.
Input, char *TITLE, a title.
*/
{
r8mat_print_some ( m, n, a, 1, 1, m, n, title );
return;
}
/******************************************************************************/
void r8mat_print_some ( int m, int n, double a[], int ilo, int jlo, int ihi,
int jhi, char *title )
/******************************************************************************/
/*
Purpose:
R8MAT_PRINT_SOME prints some of an R8MAT.
Discussion:
An R8MAT is a doubly dimensioned array of R8 values, stored as a vector
in column-major order.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
26 June 2013
Author:
John Burkardt
Parameters:
Input, int M, the number of rows of the matrix.
M must be positive.
Input, int N, the number of columns of the matrix.
N must be positive.
Input, double A[M*N], the matrix.
Input, int ILO, JLO, IHI, JHI, designate the first row and
column, and the last row and column to be printed.
Input, char *TITLE, a title.
*/
{
# define INCX 5
int i;
int i2hi;
int i2lo;
int j;
int j2hi;
int j2lo;
fprintf ( stdout, "\n" );
fprintf ( stdout, "%s\n", title );
if ( m <= 0 || n <= 0 )
{
fprintf ( stdout, "\n" );
fprintf ( stdout, " (None)\n" );
return;
}
/*
Print the columns of the matrix, in strips of 5.
*/
for ( j2lo = jlo; j2lo <= jhi; j2lo = j2lo + INCX )
{
j2hi = j2lo + INCX - 1;
if ( n < j2hi )
{
j2hi = n;
}
if ( jhi < j2hi )
{
j2hi = jhi;
}
fprintf ( stdout, "\n" );
/*
For each column J in the current range...
Write the header.
*/
fprintf ( stdout, " Col: ");
for ( j = j2lo; j <= j2hi; j++ )
{
fprintf ( stdout, " %7d ", j - 1 );
}
fprintf ( stdout, "\n" );
fprintf ( stdout, " Row\n" );
fprintf ( stdout, "\n" );
/*
Determine the range of the rows in this strip.
*/
if ( 1 < ilo )
{
i2lo = ilo;
}
else
{
i2lo = 1;
}
if ( m < ihi )
{
i2hi = m;
}
else
{
i2hi = ihi;
}
for ( i = i2lo; i <= i2hi; i++ )
{
/*
Print out (up to) 5 entries in row I, that lie in the current strip.
*/
fprintf ( stdout, "%5d:", i - 1 );
for ( j = j2lo; j <= j2hi; j++ )
{
fprintf ( stdout, " %14g", a[i-1+(j-1)*m] );
}
fprintf ( stdout, "\n" );
}
}
return;
# undef INCX
}
/******************************************************************************/
double *r8vec_copy_new ( int n, double a1[] )
/******************************************************************************/
/*
Purpose:
R8VEC_COPY_NEW copies an R8VEC.
Discussion:
An R8VEC is a vector of R8's.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
26 August 2008
Author:
John Burkardt
Parameters:
Input, int N, the number of entries in the vectors.
Input, double A1[N], the vector to be copied.
Output, double R8VEC_COPY_NEW[N], the copy of A1.
*/
{
double *a2;
int i;
a2 = ( double * ) malloc ( n * sizeof ( double ) );
for ( i = 0; i < n; i++ )
{
a2[i] = a1[i];
}
return a2;
}
/******************************************************************************/
void r8vec_print ( int n, double a[], char *title )
/******************************************************************************/
/*
Purpose:
R8VEC_PRINT prints an R8VEC.
Discussion:
An R8VEC is a vector of R8's.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
08 April 2009
Author:
John Burkardt
Parameters:
Input, int N, the number of components of the vector.
Input, double A[N], the vector to be printed.
Input, char *TITLE, a title.
*/
{
int i;
fprintf ( stdout, "\n" );
fprintf ( stdout, "%s\n", title );
fprintf ( stdout, "\n" );
for ( i = 0; i < n; i++ )
{
fprintf ( stdout, " %8d: %14g\n", i, a[i] );
}
return;
}
/******************************************************************************/
double *r8vec_uniform_01_new ( int n, int *seed )
/******************************************************************************/
/*
Purpose:
R8VEC_UNIFORM_01_NEW returns a unit pseudorandom R8VEC.
Discussion:
This routine implements the recursion
seed = 16807 * seed mod ( 2^31 - 1 )
unif = seed / ( 2^31 - 1 )
The integer arithmetic never requires more than 32 bits,
including a sign bit.
Licensing:
This code is distributed under the GNU LGPL license.
Modified:
19 August 2004
Author:
John Burkardt
Reference:
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
Second Edition,
Springer, 1987,
ISBN: 0387964673,
LC: QA76.9.C65.B73.
Bennett Fox,
Algorithm 647:
Implementation and Relative Efficiency of Quasirandom
Sequence Generators,
ACM Transactions on Mathematical Software,
Volume 12, Number 4, December 1986, pages 362-376.
Pierre L'Ecuyer,
Random Number Generation,
in Handbook of Simulation,
edited by Jerry Banks,
Wiley, 1998,
ISBN: 0471134031,
LC: T57.62.H37.
Peter Lewis, Allen Goodman, James Miller,
A Pseudo-Random Number Generator for the System/360,
IBM Systems Journal,
Volume 8, Number 2, 1969, pages 136-143.
Parameters:
Input, int N, the number of entries in the vector.
Input/output, int *SEED, a seed for the random number generator.
Output, double R8VEC_UNIFORM_01_NEW[N], the vector of pseudorandom values.
*/
{
int i;
const int i4_huge = 2147483647;
int k;
double *r;
if ( *seed == 0 )
{
fprintf ( stderr, "\n" );
fprintf ( stderr, "R8VEC_UNIFORM_01_NEW - Fatal error!\n" );
fprintf ( stderr, " Input value of SEED = 0.\n" );
exit ( 1 );
}
r = ( double * ) malloc ( n * sizeof ( double ) );
for ( i = 0; i < n; i++ )
{
k = *seed / 127773;
*seed = 16807 * ( *seed - k * 127773 ) - k * 2836;
if ( *seed < 0 )
{
*seed = *seed + i4_huge;
}
r[i] = ( double ) ( *seed ) * 4.656612875E-10;
}
return r;
}
/******************************************************************************/
void timestamp ( )
/******************************************************************************/
/*
Purpose:
TIMESTAMP prints the current YMDHMS date as a time stamp.
Example:
31 May 2001 09:45:54 AM
Licensing:
This code is distributed under the GNU LGPL license.