|
Last change
on this file since 3626 was 2615, checked in by cmv, 21 years ago |
|
using namespace sophya enleve de machdefs.h, nouveau sopnamsp.h cmv 10/09/2004
|
|
File size:
698 bytes
|
| Line | |
|---|
| 1 | #include "sopnamsp.h"
|
|---|
| 2 | #include "machdefs.h"
|
|---|
| 3 | #include "tabmath.h"
|
|---|
| 4 |
|
|---|
| 5 | ///////////////////////////////
|
|---|
| 6 | // Exponentielles tabulees //
|
|---|
| 7 | ///////////////////////////////
|
|---|
| 8 |
|
|---|
| 9 | TabFExp::TabFExp()
|
|---|
| 10 | {
|
|---|
| 11 | tab = new double[10000];
|
|---|
| 12 |
|
|---|
| 13 | for(int i=0; i<10000; i++)
|
|---|
| 14 | tab[i] = exp(-(double)i*0.001) ;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | TabFExp::~TabFExp()
|
|---|
| 18 | {
|
|---|
| 19 | delete[] tab;
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | TabFExp* SOPHYA::ptabFExp;
|
|---|
| 23 |
|
|---|
| 24 | ////////////////////////////////////
|
|---|
| 25 | // Sinus tabules (et Cosinus) //
|
|---|
| 26 | ////////////////////////////////////
|
|---|
| 27 |
|
|---|
| 28 | TabFSin::TabFSin(int n)
|
|---|
| 29 | {
|
|---|
| 30 | if(n<=1) n=10000;
|
|---|
| 31 | tab = new double[n];
|
|---|
| 32 | delta = Pi/2. / (double) (n-1);
|
|---|
| 33 | for(int i=0; i<n; i++)
|
|---|
| 34 | tab[i] = sin((double)i* delta) ;
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | TabFSin::~TabFSin()
|
|---|
| 38 | {
|
|---|
| 39 | delete[] tab;
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | TabFSin* SOPHYA::ptabFSin;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.