Skip to content

A short repo of some C implementation of Numerical Analysis programs

License

Notifications You must be signed in to change notification settings

eOnofri04/BaseNumericalAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BaseNumericalAnalysis

This C repository, developed during the course of AN410 Numerical Analysis - A.A.2019/19, is a collection of programs for scientific calculus application.

It follows a list of the main methods implemented:

Programs Implemented

  • Direct methods for solving linear systems
    • Gauss Elimination
    • LU Factorization
      • Cholesky Factorization
      • Doolittle Factorization
    • QR factorization
  • Iteratives methods for solving linear systems
    • Jacobi method
    • Gauss-Seidel method
    • Sor method
    • Richardson
  • Recursive methods for function zeros
    • Bisection
    • Chord
    • Muller
    • Newton
    • Newton Quotient
    • Secantes
    • Steffensen
  • Interpolation methods for function approximation over equidistant/chebyshev knots
    • Lagrange interpolate
    • Newton interpolate
    • Hermite interpolate
  • Least-square method for function approximation
    • First Order Least-squares
    • Higher Order Least-Squares

Dependecies

Even if it is not necessary, an useful tool called by the program is GnuPlot. To change the path to the executable of GnuPlot it is necessary to change the macro defined in src/utils/an1.utils.h.

Structure of the Repository

  • gnuplot-scripts: Contains the GnuPlot scripts called from inside the C code.
  • results: Contains the computation output of the program.
  • source: Contains all the default parsing .txt files.
  • src: Source folder of the .c and .h files:
    • direct: direct methods implementation
    • function-zeros: function zeros evaluation methods implementation
    • interpolation: interpolation methods implementation
    • iteratives: iteratives methods implementation
    • utils: all the utilities usefull for the program
      • an1.utils.h
      • utils_functions.c
      • utils_matrices.c
      • utils_systems.c
      • utils_utility.c
      • utils_vectors.c

The file src/utils/an1.utils.h also declare all the macros used here also as global parameter.

Some of them could be modified in order to change the outputs:

Macro Usage
lfpf long float print format
flfpf long float print format over files
gnuplot(x) gnuplot application path
MAX_ATTEMPTs max attempts for iterative methods
MAX_ERRs max number of errors during choosing
ERR default max error for approximations
MAX_POINTs max number of data points that could be evaluated
CONST_DATA number of data points for sample functions evaluation

Author

Bibliography Link

Releases

No releases published

Packages

No packages published