source: trunk/src/BisectionLocator.cpp@ 2730

Last change on this file since 2730 was 2730, checked in by Takeshi Nakazato, 12 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
16namespace asap {
17BisectionLocator::BisectionLocator()
18 : Locator()
19{
20}
21
22
23BisectionLocator::BisectionLocator(double *v, unsigned int n, bool copystorage)
24 : Locator(v, n, copystorage)
25{}
26
27BisectionLocator::~BisectionLocator()
28{}
29
30unsigned 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.