Category Archive: Uncategorized

Bisection method

A simple C++ example of the Bisection method for finding the root of a function bsm.h bsm.cpp   main.cpp

class, operator overloading, ex. on vector

Simple example of vector class. The present example illustrates how to use the operator overloading and the vector class is used here as an example. A programmer who wish to use a vector… Continue reading

class, simple ode 2

Simple ordinary differential equation with euler explicit, predictor corrector euler and second order Runge Kutta. Main.cpp ode.h ode.cpp srcFunction.cpp

class, simple ODE with EE method

This is a simple code which illustrated the use of euler explicit method for solving an ordinary differential equation. Main ode.h ode.cpp srcFunction.h srcFunction.cpp

Computation of nth-degree of Bernstein polynomials

AllBernstein.cpp AllBernstein.h main.cpp

value of Bernstein polynomial

Class, copy constructor, copy assignment

Class example

Example of Namespace

Passing a pntr of a function to a function

Passing a pointer of a function to a function

Function that returns a pointer

A function that takes as input a matrix and a vector and returns a pointer as output.

Enumeration and Switch statement

The following C++ code describes an enumeration user defined type together with a switch statement

Dynamic allocation of matrix

This C++ example demonstrates the dynamic allocation of memory for lower triangular or symmetric matrix

Machine Limits

A small c++ example which prints out the limits of some basic data types in the pc that is run to.