C++ is a general-purpose programming language, developed by Bjarne Stroustrup as an extension of the C language, or "C with Classes". It has imperative, object-oriented and generic programming features, while providing facilities for low-level memory manipulation, it is always implemented as a compiled language, many vendors provide C++ compilers, including the Free Software Foundation, Intel, IBM, so it is available on many platforms. C++ was designed with a bias toward system programming and embedded, resource-constrained software and large systems, with performance and flexibility of use as its design highlights. C++ has been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications, including desktop applications and performance-critical applications. C++ is standardized by the International Organization for Standardization, with the latest standard version ratified and published by ISO in December 2017 as ISO/IEC 14882:2017.
The C++ programming language was standardized in 1998 as ISO/IEC 14882:1998, amended by the C++03, C++11 and C++14 standards. The current C++ 17 standard supersedes these with an enlarged standard library. Before the initial standardization in 1998, C++ was developed by Danish computer scientist Bjarne Stroustrup at Bell Labs since 1979 as an extension of the C language. C++20 is the next planned standard, keeping with the current trend of a new version every three years. In 1979, Bjarne Stroustrup, a Danish computer scientist, began work on "C with Classes", the predecessor to C++; the motivation for creating a new language originated from Stroustrup's experience in programming for his Ph. D. thesis. Stroustrup found that Simula had features that were helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development; when Stroustrup started working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with respect to distributed computing.
Remembering his Ph. D. experience, Stroustrup set out to enhance the C language with Simula-like features. C was chosen because it was general-purpose, fast and used; as well as C and Simula's influences, other languages influenced C++, including ALGOL 68, Ada, CLU and ML. Stroustrup's "C with Classes" added features to the C compiler, including classes, derived classes, strong typing and default arguments. In 1983, "C with Classes" was renamed to "C++", adding new features that included virtual functions, function name and operator overloading, constants, type-safe free-store memory allocation, improved type checking, BCPL style single-line comments with two forward slashes. Furthermore, it included the development of a standalone compiler for Cfront. In 1985, the first edition of The C++ Programming Language was released, which became the definitive reference for the language, as there was not yet an official standard; the first commercial implementation of C++ was released in October of the same year.
In 1989, C++ 2.0 was released, followed by the updated second edition of The C++ Programming Language in 1991. New features in 2.0 included multiple inheritance, abstract classes, static member functions, const member functions, protected members. In 1990, The Annotated C++ Reference Manual was published; this work became the basis for the future standard. Feature additions included templates, namespaces, new casts, a boolean type. After the 2.0 update, C++ evolved slowly until, in 2011, the C++11 standard was released, adding numerous new features, enlarging the standard library further, providing more facilities to C++ programmers. After a minor C++14 update released in December 2014, various new additions were introduced in C++17, further changes planned for 2020; as of 2017, C++ remains the third most popular programming language, behind Java and C. On January 3, 2018, Stroustrup was announced as the 2018 winner of the Charles Stark Draper Prize for Engineering, "for conceptualizing and developing the C++ programming language".
According to Stroustrup: "the name signifies the evolutionary nature of the changes from C". This name is credited to Rick Mascitti and was first used in December 1983; when Mascitti was questioned informally in 1992 about the naming, he indicated that it was given in a tongue-in-cheek spirit. The name comes from C's ++ operator and a common naming convention of using "+" to indicate an enhanced computer program. During C++'s development period, the language had been referred to as "new C" and "C with Classes" before acquiring its final name. Throughout C++'s life, its development and evolution has been guided by a set of principles: It must be driven by actual problems and its features should be useful in real world programs; every feature should be implementable. Programmers should be free to pick their own programming style, that style should be supported by C++. Allowing a useful feature is more important than preventing every possible misuse of C++, it should provide facilities for organising programs into separate, well-defined parts, provide facilities for combining separately developed parts.
No implicit violations of the type system (but allow explicit violations.
A mathematical model is a description of a system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling. Mathematical models are used in the natural sciences and engineering disciplines, as well as in the social sciences. A model may help to explain a system and to study the effects of different components, to make predictions about behaviour. Mathematical models can take many forms, including dynamical systems, statistical models, differential equations, or game theoretic models; these and other types of models can overlap, with a given model involving a variety of abstract structures. In general, mathematical models may include logical models. In many cases, the quality of a scientific field depends on how well the mathematical models developed on the theoretical side agree with results of repeatable experiments. Lack of agreement between theoretical mathematical models and experimental measurements leads to important advances as better theories are developed.
In the physical sciences, a traditional mathematical model contains most of the following elements: Governing equations Supplementary sub-models Defining equations Constitutive equations Assumptions and constraints Initial and boundary conditions Classical constraints and kinematic equations Mathematical models are composed of relationships and variables. Relationships can be described by operators, such as algebraic operators, differential operators, etc. Variables are abstractions of system parameters of interest. Several classification criteria can be used for mathematical models according to their structure: Linear vs. nonlinear: If all the operators in a mathematical model exhibit linearity, the resulting mathematical model is defined as linear. A model is considered to be nonlinear otherwise; the definition of linearity and nonlinearity is dependent on context, linear models may have nonlinear expressions in them. For example, in a statistical linear model, it is assumed that a relationship is linear in the parameters, but it may be nonlinear in the predictor variables.
A differential equation is said to be linear if it can be written with linear differential operators, but it can still have nonlinear expressions in it. In a mathematical programming model, if the objective functions and constraints are represented by linear equations the model is regarded as a linear model. If one or more of the objective functions or constraints are represented with a nonlinear equation the model is known as a nonlinear model. Nonlinearity in simple systems, is associated with phenomena such as chaos and irreversibility. Although there are exceptions, nonlinear systems and models tend to be more difficult to study than linear ones. A common approach to nonlinear problems is linearization, but this can be problematic if one is trying to study aspects such as irreversibility, which are tied to nonlinearity. Static vs. dynamic: A dynamic model accounts for time-dependent changes in the state of the system, while a static model calculates the system in equilibrium, thus is time-invariant.
Dynamic models are represented by differential equations or difference equations. Explicit vs. implicit: If all of the input parameters of the overall model are known, the output parameters can be calculated by a finite series of computations, the model is said to be explicit. But sometimes it is the output parameters which are known, the corresponding inputs must be solved for by an iterative procedure, such as Newton's method or Broyden's method. In such a case the model is said to be implicit. For example, a jet engine's physical properties such as turbine and nozzle throat areas can be explicitly calculated given a design thermodynamic cycle at a specific flight condition and power setting, but the engine's operating cycles at other flight conditions and power settings cannot be explicitly calculated from the constant physical properties. Discrete vs. continuous: A discrete model treats objects as discrete, such as the particles in a molecular model or the states in a statistical model.
Deterministic vs. probabilistic: A deterministic model is one in which every set of variable states is uniquely determined by parameters in the model and by sets of previous states of these variables. Conversely, in a stochastic model—usually called a "statistical model"—randomness is present, variable states are not described by unique values, but rather by probability distributions. Deductive, inductive, or floating: A deductive model is a logical structure based on a theory. An inductive model arises from empirical findings and generalization from them; the floating model rests on neither theory nor observation, but is the invocation of expected structure. Application of mathematics in social sciences outside of economics has been criticized for unfounded models. Application of catastrophe theory in science has been characterized as a floating model. Mathematical models are of great importance in the natural sciences in physics. Physical theories are invariably expressed using mathematic
Linear programming is a method to achieve the best outcome in a mathematical model whose requirements are represented by linear relationships. Linear programming is a special case of mathematical programming. More formally, linear programming is a technique for the optimization of a linear objective function, subject to linear equality and linear inequality constraints, its feasible region is a convex polytope, a set defined as the intersection of finitely many half spaces, each of, defined by a linear inequality. Its objective function is a real-valued affine function defined on this polyhedron. A linear programming algorithm finds a point in the polyhedron where this function has the smallest value if such a point exists. Linear programs are problems that can be expressed in canonical form as Maximize c T x subject to A x ≤ b and x ≥ 0 where x represents the vector of variables, c and b are vectors of coefficients, A is a matrix of coefficients, T is the matrix transpose; the expression to be maximized or minimized is called the objective function.
The inequalities Ax ≤ b and x ≥ 0 are the constraints which specify a convex polytope over which the objective function is to be optimized. In this context, two vectors are comparable. If every entry in the first is less-than or equal-to the corresponding entry in the second it can be said that the first vector is less-than or equal-to the second vector. Linear programming can be applied to various fields of study, it is used in mathematics, to a lesser extent in business and for some engineering problems. Industries that use linear programming models include transportation, telecommunications, manufacturing, it has proven useful in modeling diverse types of problems in planning, scheduling and design. The problem of solving a system of linear inequalities dates back at least as far as Fourier, who in 1827 published a method for solving them, after whom the method of Fourier–Motzkin elimination is named. In 1939 a linear programming formulation of a problem, equivalent to the general linear programming problem was given by the Soviet economist Leonid Kantorovich, who proposed a method for solving it.
It is a way he developed, during World War II, to plan expenditures and returns in order to reduce costs of the army and to increase losses imposed on the enemy. Kantorovich's work was neglected in the USSR. About the same time as Kantorovich, the Dutch-American economist T. C. Koopmans formulated classical economic problems as linear programs. Kantorovich and Koopmans shared the 1975 Nobel prize in economics. In 1941, Frank Lauren Hitchcock formulated transportation problems as linear programs and gave a solution similar to the simplex method. Hitchcock had died in 1957 and the Nobel prize is not awarded posthumously. During 1946–1947, George B. Dantzig independently developed general linear programming formulation to use for planning problems in US Air Force. In 1947, Dantzig invented the simplex method that for the first time efficiently tackled the linear programming problem in most cases; when Dantzig arranged a meeting with John von Neumann to discuss his simplex method, Neumann conjectured the theory of duality by realizing that the problem he had been working in game theory was equivalent.
Dantzig provided formal proof in an unpublished report "A Theorem on Linear Inequalities" on January 5, 1948. In the post-war years, many industries applied it in their daily planning. Dantzig's original example was to find the best assignment of 70 people to 70 jobs; the computing power required to test all the permutations to select the best assignment is vast. However, it takes only a moment to find the optimum solution by posing the problem as a linear program and applying the simplex algorithm; the theory behind linear programming drastically reduces the number of possible solutions that must be checked. The linear programming problem was first shown to be solvable in polynomial time by Leonid Khachiyan in 1979, but a larger theoretical and practical breakthrough in the field came in 1984 when Narendra Karmarkar introduced a new interior-point method for solving linear-programming problems. Linear programming is a used field of optimization for several reasons. Many practical problems in operations research can be expressed as linear programming problems.
Certain special cases of linear programming, such as network flow problems and multicommodity flow problems are considered important enough to have generated much research on specialized algorithms for their solution. A number of algorithms for other types of optimization problems work by solving LP problems as sub-problems. Ideas from linear programming have inspired many of the central concepts of optimization theory, such as duality and the importance of convexity and its generalizations. Linear programming was used in the early formation o
An operating system is system software that manages computer hardware and software resources and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may include accounting software for cost allocation of processor time, mass storage and other resources. For hardware functions such as input and output and memory allocation, the operating system acts as an intermediary between programs and the computer hardware, although the application code is executed directly by the hardware and makes system calls to an OS function or is interrupted by it. Operating systems are found on many devices that contain a computer – from cellular phones and video game consoles to web servers and supercomputers; the dominant desktop operating system is Microsoft Windows with a market share of around 82.74%. MacOS by Apple Inc. is in second place, the varieties of Linux are collectively in third place. In the mobile sector, use in 2017 is up to 70% of Google's Android and according to third quarter 2016 data, Android on smartphones is dominant with 87.5 percent and a growth rate 10.3 percent per year, followed by Apple's iOS with 12.1 percent and a per year decrease in market share of 5.2 percent, while other operating systems amount to just 0.3 percent.
Linux distributions are dominant in supercomputing sectors. Other specialized classes of operating systems, such as embedded and real-time systems, exist for many applications. A single-tasking system can only run one program at a time, while a multi-tasking operating system allows more than one program to be running in concurrency; this is achieved by time-sharing, where the available processor time is divided between multiple processes. These processes are each interrupted in time slices by a task-scheduling subsystem of the operating system. Multi-tasking may be characterized in co-operative types. In preemptive multitasking, the operating system slices the CPU time and dedicates a slot to each of the programs. Unix-like operating systems, such as Solaris and Linux—as well as non-Unix-like, such as AmigaOS—support preemptive multitasking. Cooperative multitasking is achieved by relying on each process to provide time to the other processes in a defined manner. 16-bit versions of Microsoft Windows used cooperative multi-tasking.
32-bit versions of both Windows NT and Win9x, used preemptive multi-tasking. Single-user operating systems have no facilities to distinguish users, but may allow multiple programs to run in tandem. A multi-user operating system extends the basic concept of multi-tasking with facilities that identify processes and resources, such as disk space, belonging to multiple users, the system permits multiple users to interact with the system at the same time. Time-sharing operating systems schedule tasks for efficient use of the system and may include accounting software for cost allocation of processor time, mass storage and other resources to multiple users. A distributed operating system manages a group of distinct computers and makes them appear to be a single computer; the development of networked computers that could be linked and communicate with each other gave rise to distributed computing. Distributed computations are carried out on more than one machine; when computers in a group work in cooperation, they form a distributed system.
In an OS, distributed and cloud computing context, templating refers to creating a single virtual machine image as a guest operating system saving it as a tool for multiple running virtual machines. The technique is used both in virtualization and cloud computing management, is common in large server warehouses. Embedded operating systems are designed to be used in embedded computer systems, they are designed to operate on small machines like PDAs with less autonomy. They are able to operate with a limited number of resources, they are compact and efficient by design. Windows CE and Minix 3 are some examples of embedded operating systems. A real-time operating system is an operating system that guarantees to process events or data by a specific moment in time. A real-time operating system may be single- or multi-tasking, but when multitasking, it uses specialized scheduling algorithms so that a deterministic nature of behavior is achieved. An event-driven system switches between tasks based on their priorities or external events while time-sharing operating systems switch tasks based on clock interrupts.
A library operating system is one in which the services that a typical operating system provides, such as networking, are provided in the form of libraries and composed with the application and configuration code to construct a unikernel: a specialized, single address space, machine image that can be deployed to cloud or embedded environments. Early computers were built to perform a series of single tasks, like a calculator. Basic operating system features were developed in the 1950s, such as resident monitor functions that could automatically run different programs in succession to speed up processing. Operating systems did not exist in their more complex forms until the early 1960s. Hardware features were added, that enabled use of runtime libraries and parallel processing; when personal computers became popular in the 1980s, operating systems were made for them similar in concept to those used on larger computers. In the 1940s, the earliest electronic digital systems had no operating systems.
Electronic systems of this time were programmed on rows of mechanical switches or by jumper wires on plug boards. These were special-purpose systems that, for example, generated ballistics tables for the military or controlled the pri
A Mathematical Programming Language is an algebraic modeling language to describe and solve high-complexity problems for large-scale mathematical computing. It was developed by Robert Fourer, David Gay, Brian Kernighan at Bell Laboratories. AMPL supports dozens of solvers, both open source and commercial software, including CBC, CPLEX, FortMP, Gurobi, MINOS, IPOPT, SNOPT, KNITRO, LGO. Problems are passed to solvers as nl files. AMPL is used by more than 100 corporate clients, by government agencies and academic institutions. One advantage of AMPL is the similarity of its syntax to the mathematical notation of optimization problems; this allows for a concise and readable definition of problems in the domain of optimization. Many modern solvers available on the NEOS Server accept AMPL input. According to the NEOS statistics AMPL is the most popular format for representing mathematical programming problems. AMPL features a mix of imperative programming styles. Formulating optimization models occurs via declarative language elements such as sets and multidimensional parameters, decision variables and constraints, which allow for concise description of most problems in the domain of mathematical optimization.
Procedures and control flow statements are available in AMPL for the exchange of data with external data sources such as spreadsheets, databases, XML and text files data pre- and post-processing tasks around optimization models the construction of hybrid algorithms for problem types for which no direct efficient solvers are available. To support re-use and simplify construction of large-scale optimization problems, AMPL allows separation of model and data. AMPL supports a wide range of problem types, among them: Linear programming Quadratic programming Nonlinear programming Mixed-integer programming Mixed-integer quadratic programming with or without convex quadratic constraints Mixed-integer nonlinear programming Second-order cone programming Global optimization Semidefinite programming problems with bilinear matrix inequalities Complementarity theory problems in discrete or continuous variables Constraint programmingAMPL invokes a solver in a separate process which has these advantages: User can interrupt the solution process at any time Solver errors do not affect the interpreter 32-bit version of AMPL can be used with a 64-bit solver and vice versaInteraction with the solver is done through a well-defined nl interface.
AMPL is available for many popular 32- and 64-bit operating systems including Linux, Mac OS X, some Unix, Windows. The translator is proprietary software maintained by AMPL Optimization LLC. However, several online services exist, providing free modeling and solving facilities using AMPL. A free student version with limited functionality and a free full-featured version for academic courses are available. AMPL can be used from within Microsoft Excel via the SolverStudio Excel add-in; the AMPL Solver Library, which allows reading nl files and provides the automatic differentiation, is open-source. It is used in many solvers to implement AMPL connection; this table present significant steps in AMPL history. A transportation problem from George Dantzig is used to provide a sample AMPL model; this problem finds the least cost shipping schedule that meets requirements at markets and supplies at factories. Here is a partial list of solvers supported by AMPL: sol Official website Prof. Fourer's home page at Northwestern University
Fortran is a general-purpose, compiled imperative programming language, suited to numeric computation and scientific computing. Developed by IBM in the 1950s for scientific and engineering applications, FORTRAN came to dominate this area of programming early on and has been in continuous use for over half a century in computationally intensive areas such as numerical weather prediction, finite element analysis, computational fluid dynamics, computational physics and computational chemistry, it is a popular language for high-performance computing and is used for programs that benchmark and rank the world's fastest supercomputers. Fortran encompasses a lineage of versions, each of which evolved to add extensions to the language while retaining compatibility with prior versions. Successive versions have added support for structured programming and processing of character-based data, array programming, modular programming and generic programming, high performance Fortran, object-oriented programming and concurrent programming.
Fortran's design was the basis for many other programming languages. Among the better known is BASIC, based on FORTRAN II with a number of syntax cleanups, notably better logical structures, other changes to more work in an interactive environment; the names of earlier versions of the language through FORTRAN 77 were conventionally spelled in all-capitals. The capitalization has been dropped in referring to newer versions beginning with Fortran 90; the official language standards now refer to the language as "Fortran" rather than all-caps "FORTRAN". In late 1953, John W. Backus submitted a proposal to his superiors at IBM to develop a more practical alternative to assembly language for programming their IBM 704 mainframe computer. Backus' historic FORTRAN team consisted of programmers Richard Goldberg, Sheldon F. Best, Harlan Herrick, Peter Sheridan, Roy Nutt, Robert Nelson, Irving Ziller, Lois Haibt, David Sayre, its concepts included easier entry of equations into a computer, an idea developed by J. Halcombe Laning and demonstrated in the Laning and Zierler system of 1952.
A draft specification for The IBM Mathematical Formula Translating System was completed by November 1954. The first manual for FORTRAN appeared in October 1956, with the first FORTRAN compiler delivered in April 1957; this was the first optimizing compiler, because customers were reluctant to use a high-level programming language unless its compiler could generate code with performance comparable to that of hand-coded assembly language. While the community was skeptical that this new method could outperform hand-coding, it reduced the number of programming statements necessary to operate a machine by a factor of 20, gained acceptance. John Backus said during a 1979 interview with Think, the IBM employee magazine, "Much of my work has come from being lazy. I didn't like writing programs, so, when I was working on the IBM 701, writing programs for computing missile trajectories, I started work on a programming system to make it easier to write programs."The language was adopted by scientists for writing numerically intensive programs, which encouraged compiler writers to produce compilers that could generate faster and more efficient code.
The inclusion of a complex number data type in the language made Fortran suited to technical applications such as electrical engineering. By 1960, versions of FORTRAN were available for the IBM 709, 650, 1620, 7090 computers; the increasing popularity of FORTRAN spurred competing computer manufacturers to provide FORTRAN compilers for their machines, so that by 1963 over 40 FORTRAN compilers existed. For these reasons, FORTRAN is considered to be the first used programming language supported across a variety of computer architectures; the development of Fortran paralleled the early evolution of compiler technology, many advances in the theory and design of compilers were motivated by the need to generate efficient code for Fortran programs. The initial release of FORTRAN for the IBM 704 contained 32 statements, including: DIMENSION and EQUIVALENCE statements Assignment statements Three-way arithmetic IF statement, which passed control to one of three locations in the program depending on whether the result of the arithmetic statement was negative, zero, or positive IF statements for checking exceptions.
The arithmetic IF statement was reminiscent of a three-way comparison instruction available on the 704. The statement provided the only way to compare numbers – by testing their difference, with an attendant risk of overflow; this deficiency was overcome by "logical" facilities introduced in FORTRAN IV. The FREQUENCY statement was used to give branch probabilities for the three branch cases of the arithmetic IF statement; the first FORTRAN compiler used this weighting to perform at compile time a Monte Carlo simulation of the generated code, the results of which were used to optimize the