68 lines
2.4 KiB
C++
68 lines
2.4 KiB
C++
//
|
|
// ********************************************************************
|
|
// * DISCLAIMER *
|
|
// * *
|
|
// * The following disclaimer summarizes all the specific disclaimers *
|
|
// * of contributors to this software. The specific disclaimers,which *
|
|
// * govern, are listed with their locations in: *
|
|
// * http://cern.ch/geant4/license *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. *
|
|
// * *
|
|
// * This code implementation is the intellectual property of the *
|
|
// * GEANT4 collaboration. *
|
|
// * By copying, distributing or modifying the Program (or any work *
|
|
// * based on the Program) you indicate your acceptance of this *
|
|
// * statement, and all its terms. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
//
|
|
// --------------------------------------------------------------------
|
|
// GEANT 4 class header file
|
|
//
|
|
//
|
|
// G4ApproxPolySolver
|
|
//
|
|
// Class description:
|
|
//
|
|
// Polynomial solver for equations of the type:
|
|
// c0 + c1 x + c2 x^2 + c3 x^3 + c4 x^4
|
|
|
|
// Author:
|
|
// Oliver Link (Oliver.Link@cern.ch)
|
|
//
|
|
// --------------------------------------------------------------------
|
|
#ifndef __G4APPROXPOLYSOLVER__
|
|
#define __G4APPROXPOLYSOLVER__
|
|
|
|
#include "G4Types.hh"
|
|
#include "G4String.hh"
|
|
#include "geomdefs.hh"
|
|
|
|
class G4ApproxPolySolver
|
|
{
|
|
|
|
// c0 + c1 x + c2 x^2 + c3 x^3 + c4 x^4
|
|
|
|
public:
|
|
|
|
G4ApproxPolySolver(){}
|
|
~G4ApproxPolySolver(){}
|
|
|
|
public:
|
|
|
|
G4int SolveBiQuadratic( G4double c[], G4double s[] ) const ;
|
|
G4int SolveCubic( G4double c[], G4double s[] ) const ;
|
|
G4int SolveBiQuadraticNew( G4double c[], G4double s[] ) const ;
|
|
G4int SolveCubicNew( G4double c[], G4double s[],
|
|
G4double& cubic_discr ) const ;
|
|
G4int SolveQuadratic( G4double c[], G4double s[] ) const ;
|
|
};
|
|
|
|
#endif
|