|
Last change
on this file since 2730 was 2730, checked in by Takeshi Nakazato, 13 years ago |
New Development: No
JIRA Issue: Yes CAS-4770
Ready for Test: Yes
Interface Changes: No
What Interface Changed: Please list interface changes
Test Programs: List test programs
Put in Release Notes: Yes/No
Module(s): Module Names change impacts.
Description: Describe your changes here...
Rewrite implementations for locator and interpolator.
Documentation (doxygen format) is added to header files.
|
|
File size:
607 bytes
|
| Line | |
|---|
| 1 | //
|
|---|
| 2 | // C++ Implementation: BisectionLocator
|
|---|
| 3 | //
|
|---|
| 4 | // Description:
|
|---|
| 5 | //
|
|---|
| 6 | //
|
|---|
| 7 | // Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
|
|---|
| 8 | //
|
|---|
| 9 | // Copyright: See COPYING file that comes with this distribution
|
|---|
| 10 | //
|
|---|
| 11 | //
|
|---|
| 12 | #include <assert.h>
|
|---|
| 13 |
|
|---|
| 14 | #include "BisectionLocator.h"
|
|---|
| 15 |
|
|---|
| 16 | namespace asap {
|
|---|
| 17 | BisectionLocator::BisectionLocator()
|
|---|
| 18 | : Locator()
|
|---|
| 19 | {
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | BisectionLocator::BisectionLocator(double *v, unsigned int n, bool copystorage)
|
|---|
| 24 | : Locator(v, n, copystorage)
|
|---|
| 25 | {}
|
|---|
| 26 |
|
|---|
| 27 | BisectionLocator::~BisectionLocator()
|
|---|
| 28 | {}
|
|---|
| 29 |
|
|---|
| 30 | unsigned int BisectionLocator::locate(double x)
|
|---|
| 31 | {
|
|---|
| 32 | if (n_ == 1)
|
|---|
| 33 | return 0;
|
|---|
| 34 |
|
|---|
| 35 | return bisection(x, 0, n_);
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.