官术网_书友最值得收藏!

Function types

Procedures versus Functions:

A procedure is a description of a computation that, given an input, produces an output.

Functions or computational problems don't indicate how to compute the output from the given input.

Many methods might exist for the same specification.

A computational problem may allow several possible outputs for each input.

We will write procedures in Breeze; often, these are called functions, but we will reserve that term for the mathematical objects.

  • One to One function:

f : D -> F is one-to-one if f (x) = f (y) implies x = y; that is, both x and y are in D.

  • Onto function:

F: D -> F is onto if for every z element of F, there exists an element a in D such that f (a) = z.

A function is invertible if it is one-to-one and onto.

  • Linear functions: Linear functions are the functions whose graph is a straight line. A linear function has the form z = f(x) = a + bx. A linear function has one dependent variable, and one independent variable. The dependent variable is z, and the independent variable is x.
  • Polynomial function: A polynomial function involves only non-negative integer powers of x such as a quadratic, a cubic, a quartic, and so on. We can give a general definition of a polynomial, and define its degree. A polynomial of degree n is a function of the form f(x) = anx n + an?1x n?1 + . . . + a2x 2 + a1x + a0, where a's are real numbers, also known as coefficients of polynomials.

For example: f(x) = 4x 3 ? 3x 2 + 2

  • Identity function: For any domain D, idD: D -> D maps each domain element d to itself.
  • Constant function: this is a special function represented as a horizontal line.
  • Probability distribution function : This used to define the relative likelihood of different outcomes of a particular experiment. It assigns a probability to each potential outcome. Probabilities of all outcomes must sum equal to 1. Often, probability distribution is a uniform distribution. That means, it assigns the same probability to each outcome. When we roll a die, the possible outcomes are 1, 2, 3, 4, 5, and probabilities are defined as Pr(1) = Pr(2) = Pr(3) = Pr(4) = Pr(5) = 1/5.
  • Gaussian Function: When the number of events is large, then the Gaussian function can be used to describe events. Gaussian distribution is described as a continuous function, also known as normal distribution. Normal distribution has the mean equal to median, and has symmetry about the center.
主站蜘蛛池模板: 靖西县| 肥乡县| 舒兰市| 南雄市| 察雅县| 武山县| 湾仔区| 台东市| 买车| 灵武市| 弥渡县| 吉木萨尔县| 襄汾县| 榕江县| 丹寨县| 临汾市| 兴山县| 改则县| 文登市| 广南县| 洪泽县| 富蕴县| 常熟市| 沾益县| 甘肃省| 都兰县| 玛纳斯县| 尖扎县| 绵阳市| 宜宾县| 当阳市| 东明县| 含山县| 额尔古纳市| 龙井市| 镇赉县| 余庆县| 蕲春县| 利辛县| 贺兰县| 宁德市|