Wiring diagrams for software systems
Of course, this is only one form of communication.
Feedback welcome.

Of course, this is only one form of communication.
Feedback welcome.
. Essential functions (pdf, cdf, cdf complement)
. Measures of central tendency (mean, median, mode, quantile)
. Measures of dispersion (standard deviation, variance)
. Kurtosis, kurtosis excess, hazard functions
The library contains many of the most popular discrete and continuous probability distribution functions that we can use in computational finance. It is worth mentioning that it has now support for the Students tdistribution, Gamma distribution, Chi Squared distribution and the Noncentral Chi Squared distribution. What are the advantages of this library in our opinion?
. Standardisation (the code has been peerreviewed and conforms to the boost design standard)
. Quality: the code is efficient, robust and portable. As developer, you use the library without having to be concerned with its maintenance
. Building applications: you can use the classes in the library as part of large software systems
. No more pseudocode needed: instead of discussing nonrunnable code we can use code from Boost.Math directly, thus allowing readers to check the validity of the presented numerical results.
. Use mathematical notation whenever appropriate
. Efficiency (time and resource management)
. Functionality (provide features that appeal to a wide range of application areas)
. Compatibility (arraylike indexing and use of STL allocators for storage allocation)
The two most important data structures represent vectors and matrices. A vector is a onedimensional structure while a matrix is a twodimensional structure. We can define various vector and (especially) matrix patterns that describe how their elements are arranged in memory; examples are dense, sparse, banded, triangular, symmetric and Hermitian. These patterned matrices are needed in many kinds of applications and the can be used directly in code without you having to create them yourself. Furthermore, we can apply primitive operations on vectors and matrices:
Addition of vectors and matrices Scalar multiplication Computed assignments Transformations Norms of vectors and matrices Inner and outer products
We can use these operations in code and applications. Finally, we can define subvectors and submatrices as well as ranges and slices of vectors and matrices. Vectors and matrices are fundamental to financial and scientific applications and having a welldeveloped library such as boost.Tuple with readytouse modules will free up developer time. Seeing that matrix algebra consumes much of the effort in an application we expect that the productivity gains will be appreciable in general.
The applications of this library to PDE, Monte Carlo and other problems in computational finance are immediately obvious.See
http://www.datasimfinancial.com/forum/viewtopic.php?t=111
Here it comes, brace yourself :)
www.boost.org
// 1. Algorithms
Foreach (avoiding boilerplate iterators)
BGL (Graph library and graph algorithms)
// 2. Data Types and Data Structures
Any (generic heterogeneous data types)
Tuple (modeling multiple values in one class)
// 3. Data Containers
Array (compiletime onedimensional arrays)
Bimap (bidirectional maps, manytomany)
Dynamic bitsets (sets of dynamic bits)
MultiArray (ndimensional arrays)
MultiIndex (containers with one or more indices)
Property Map (key/value pairs)
Variant (discriminated union container)
Pointer Container (heap polymorphic objects)
// 4. I/O and Networking
Asio (portable networking, sockets)
Serialization (persistence and marshalling)
// 5. Utilities
Smart Ptr (five smart pointer template classes)
// 6. Mathematics and Numerics
Accumulators (statstical and time series)
Integer (typesafe integers)
Interval (operations on mathematical intervals)
Math (GCD, LCM, complex trigonometric functions)
Statistical distributions (~25 univariates)
Numeric Conversion (policybased)
Random (a complete system for RNG)
Rational (rational number class)
uBlas (matrix/vector; basic linear algebra routines)
// 7. HigherOrder Programming
Bind (framework for function pointers and functors)
Function (function wrappers/deferred callbacks)
Functional (templates for function object wrappers)
Lambda (small unnamed functions)
Signals (the Observer pattern using signals, slots)
Spirit (LL parser defined as EBNF grammars)
// 8. String and Text Processing
Conversion (polymorphic and lexical casts)
Format (formatting according to a formatstring)
Regex (regular expression library)
String Algo (string algorithms library)
Tokenizer (break a string into a series of tokens)
Xpressive (regular expressions and functionality)
// 9. Multithreading and Concurrent/Parallel Programming
Interprocess (shared memory, mutexes, memory maps)
MPI (Message Passing Interface, distributed memory)
Thread (potable C++ multithreading)
// 10. Template and MetaTemplate Progamming
Function Types (classify, decompose and synthesize)
Fusion (library for working with tuples)
// 11. Miscellaneous
Date Time (generic datetime libraries)
Exception (transporting arbitrary data)
Flyweight (large quantities of redundant objects)
Tribool (3state Boolean type library)
Units (dimensional analysis)
// 12. Correctness and Testing
Concept Check (tools for generic programming)
Test (simple program testing, unit testing)
. Analysing a problem (what is the problem)
. Designing (how to solve the problem)
. Matlab/C++ (implement the problem)
So, the process is "what to do, how to do, do" in that order. This approach is also good for the thought process; each activity is independent and feeds into it successor.
At the design level, the crucial element is the design of appropriate data structures and the corresponding algorithms that operate on them.
The choice between OO and generic programming is a nonissue because they both can be used.
I would recommend using STL and boost because they have the tools that we use as the plumbing. Matlab also has many libraries as well.
Testing student knowledge using these kinds of tests is more telling than focusing exclusively on syntax.
The thread on Software and the link to the original ACM questions is:
//
http://www.wilmott.com/messageview.cfm?catid=10&threadid=60837
//
A wellkept secret concerning the taming of the C++ lion is that you must learn the fundamentals before you start using more advanced syntax. Here is my own personal list that I have used with (very many) students since 1991. It corresponds to green belt knowledge:
1.Basic class structure; private and public members; header and code files
2.The vital keyword ‘const’ and the 4 places where it is used
3.Function and operator overloading; creating your own operators
4.Memory management; STACK and HEAP
5.Basic templates; STL, list
I have found that once these issues are mastered (ESPECIALLY point 4) then you will have few major problems later.
C++ is a large and flexible language. By neglecting the fundamentals we run the risk of floundering when embarking on real projects. As in judo, learn how to break fall before attempting a hip throw!