Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix the coding standar

Pointing the constructor to Math_Numerical_RootFinding_Common::Math_Numerical_RootFinding_Common


git-svn-id: http://svn.php.net/repository/pear/packages/Math_Numerical_RootFinding/trunk@206146 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit a3c80f179d4a72e8b2fb3b5855df59d15017681a 1 parent ef1c5d9
Firman Wandayandi authored
View
102 Math/Numerical/RootFinding/Bisection.php
@@ -1,61 +1,60 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
+
// {{{ Header
-// +----------------------------------------------------------------------+
-// | PEAR, the PHP Extension and Application Repository |
-// +----------------------------------------------------------------------+
-// | PHP version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (C) 2004 Firman Wandayandi |
-// | All rights reserved. |
-// +----------------------------------------------------------------------+
-// | Redistribution and use in source and binary forms, with or without |
-// | modification, are permitted provided that the following conditions |
-// | are met: |
-// | |
-// | Redistributions of source code must retain the above copyright |
-// | notice, this list of conditions and the following disclaimer. |
-// | |
-// | Redistributions in binary form must reproduce the above |
-// | copyright notice, this list of conditions and the following |
-// | disclaimer in the documentation and/or other materials provided |
-// | with the distribution. |
-// | |
-// | Neither the name of Firman Wandayandi nor the names of |
-// | contributors may be used to endorse or promote products derived |
-// | from this software without specific prior written permission. |
-// | |
-// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
-// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
-// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
-// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
-// | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
-// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
-// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
-// | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
-// | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
-// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
-// | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
-// | POSSIBILITY OF SUCH DAMAGE. |
-// +----------------------------------------------------------------------+
-// | Authors: Firman Wandayandi <firman@php.net> |
-// +----------------------------------------------------------------------+
-// }}}
-// $Id$
/**
* Driver file contains Math_Numerical_RootFinding_Bisection class to provide
* Bisection/Binary Chopping/Interval Halving/Bolzano method root finding
* calculation.
*
- * @author Firman Wandayandi <firman@php.net>
+ * PHP versions 4 and 5
+ *
+ * LICENSE:
+ *
+ * BSD License
+ *
+ * Copyright (c) 2004-2006 Firman Wandayandi
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * 3. Neither the name of Firman Wandayandi nor the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category Math
* @package Math_Numerical_RootFinding
* @subpackage Methods
- * @category Math
+ * @author Firman Wandayandi <firman@php.net>
+ * @copyright Copyright (c) 2004-2006 Firman Wandayandi
* @license http://www.opensource.org/licenses/bsd-license.php
* BSD License
+ * @version CVS: $Id$
*/
+// }}}
// {{{ Dependencies
/**
@@ -64,13 +63,19 @@
require_once 'Math/Numerical/RootFinding/Common.php';
// }}}
+// {{{ Class: Math_Numerical_RootFinding_Bisection
/**
* Bisection/Binary Chopping/Interval Halving/Bolzano method class.
*
- * @author Firman Wandayandi <firman@php.net>
+ * @category Math
* @package Math_Numerical_RootFinding
* @subpackage Methods
+ * @author Firman Wandayandi <firman@php.net>
+ * @copyright Copyright (c) 2004-2006 Firman Wandayandi
+ * @license http://www.opensource.org/licenses/bsd-license.php
+ * BSD License
+ * @version Release: @package_version@
*/
class Math_Numerical_RootFinding_Bisection
extends Math_Numerical_RootFinding_Common
@@ -78,15 +83,16 @@ class Math_Numerical_RootFinding_Bisection
// {{{ Constructor
/**
- * PHP4 compatible constructor.
+ * Constructor.
*
- * @param array $options Options.
+ * @param array $options (optional) Options.
*
* @access public
+ * @see Math_Numerical_RootFinding_Common::Math_Numerical_RootFinding_Common()
*/
function Math_Numerical_RootFinding_Bisection($options = null)
{
- parent::__construct($options);
+ parent::Math_Numerical_RootFinding_Common($options);
}
// }}}
@@ -203,6 +209,8 @@ function compute($fxFunction, $xL, $xU)
// }}}
}
+// }}}
+
/*
* Local variables:
* mode: php
View
102 Math/Numerical/RootFinding/Secant.php
@@ -1,60 +1,59 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
+
// {{{ Header
-// +----------------------------------------------------------------------+
-// | PEAR, the PHP Extension and Application Repository |
-// +----------------------------------------------------------------------+
-// | PHP version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (C) 2004 Firman Wandayandi |
-// | All rights reserved. |
-// +----------------------------------------------------------------------+
-// | Redistribution and use in source and binary forms, with or without |
-// | modification, are permitted provided that the following conditions |
-// | are met: |
-// | |
-// | Redistributions of source code must retain the above copyright |
-// | notice, this list of conditions and the following disclaimer. |
-// | |
-// | Redistributions in binary form must reproduce the above |
-// | copyright notice, this list of conditions and the following |
-// | disclaimer in the documentation and/or other materials provided |
-// | with the distribution. |
-// | |
-// | Neither the name of Firman Wandayandi nor the names of |
-// | contributors may be used to endorse or promote products derived |
-// | from this software without specific prior written permission. |
-// | |
-// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
-// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
-// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
-// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
-// | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
-// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
-// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
-// | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
-// | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
-// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
-// | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
-// | POSSIBILITY OF SUCH DAMAGE. |
-// +----------------------------------------------------------------------+
-// | Authors: Firman Wandayandi <firman@php.net> |
-// +----------------------------------------------------------------------+
-// }}}
-// $Id$
/**
* Driver file contains Math_Numerical_RootFinding_Bisection class to provide
* Secant method root finding calculation.
*
- * @author Firman Wandayandi <firman@php.net>
+ * PHP versions 4 and 5
+ *
+ * LICENSE:
+ *
+ * BSD License
+ *
+ * Copyright (c) 2004-2006 Firman Wandayandi
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * 3. Neither the name of Firman Wandayandi nor the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category Math
* @package Math_Numerical_RootFinding
* @subpackage Methods
- * @category Math
+ * @author Firman Wandayandi <firman@php.net>
+ * @copyright Copyright (c) 2004-2006 Firman Wandayandi
* @license http://www.opensource.org/licenses/bsd-license.php
* BSD License
+ * @version CVS: $Id$
*/
+// }}}
// {{{ Dependencies
/**
@@ -63,13 +62,19 @@
require_once 'Math/Numerical/RootFinding/Common.php';
// }}}
+// {{{ Class: Math_Numerical_RootFinding_Secant
/**
* Secant method class.
*
- * @author Firman Wandayandi <firman@php.net>
+ * @category Math
* @package Math_Numerical_RootFinding
* @subpackage Methods
+ * @author Firman Wandayandi <firman@php.net>
+ * @copyright Copyright (c) 2004-2006 Firman Wandayandi
+ * @license http://www.opensource.org/licenses/bsd-license.php
+ * BSD License
+ * @version Release: @package_version@
*/
class Math_Numerical_RootFinding_Secant
extends Math_Numerical_RootFinding_Common
@@ -77,15 +82,16 @@ class Math_Numerical_RootFinding_Secant
// {{{ Constructor
/**
- * PHP4 compatible constructor.
+ * Constructor.
*
- * @param array $options Options.
+ * @param array $options (optional) Options.
*
* @access public
+ * @see Math_Numerical_RootFinding_Common::Math_Numerical_RootFinding_Common()
*/
function Math_Numerical_RootFinding_Secant($options = null)
{
- parent::__construct($options);
+ parent::Math_Numerical_RootFinding_Common($options);
}
// }}}
@@ -201,6 +207,8 @@ function compute($fxFunction, $xR0, $xR1)
// }}}
}
+// }}}
+
/*
* Local variables:
* mode: php
Please sign in to comment.
Something went wrong with that request. Please try again.