Saturday, 23 January 2016

Stoer-Wagner Min Cut algorithm

The F# Journal just published an article about graph theory:
"Many practical problems require the ability to find or approximate the set of edges with the smallest total weight that join a graph into two separate subgraphs. This article walks through the design and implementation of a simple F# program to compute the exact min cut of an undirected weighted graph using the Stoer-Wagner algorithm..."
To read this article and more, subscribe to The F# Journal today!

Sunday, 17 January 2016

Lexing floating-point numbers efficiently

The F# Journal just published an article about lexing:
"The .NET Framework provides functions to parse primitive types including floating point numbers. These functions all adhere to the same API: the string being parsed must hold only the number. This simple API is fine for prototyping and production when performance does not matter but practical applications often lex streams of input containing numbers and, therefore, benefit from the ability to parse a number that is a substring in a given string with a specific starting index and length. This article looks at the design and implementation of a function to lex a sequence of floating point numbers from a string and compares the performance with a version that uses the built-in parsing functions..."
To read this article and more, subscribe to The F# Journal today!

Lexing integers efficiently

The F# Journal just published an article about lexing:
"The .NET Framework provides functions to parse primitive types including integers. These functions all adhere to the same API: the string being parsed must hold only the number. This simple API is fine for prototyping and production when performance does not matter but practical applications often lex streams of input containing numbers and, therefore, benefit from the ability to parse a number that is a substring in a given string with a specific starting index and length. This article looks at the design and implementation of a function to lex a sequence of integers from string and compares the performance with a version that uses the built-in parsing functions, finding that the bespoke solution is 9x faster..."
To read this article and more, subscribe to The F# Journal today!

Decorating trees

The F# Journal just published an article about data structures:
"F# is a versatile language that allows for many different ways in which to tackle a problem, since it encompasses functional, imperative and object-oriented programming techniques. However, the fact remains that it is a functional-first language, and as such, unless otherwise stated, it treats each computation as the evaluation of a mathematical function. Functions are seen as pure, meaning that they do not have side effects, either via memory or I/O actions - they do not alter the program's state. We're going to look at a standard problem which, using F#'s capabilities, can be solved by making use of some notion of state..."
To read this article and more, subscribe to The F# Journal today!

A new GVEdit

The F# Journal just published an article about GUI applications:
"Graphviz is a great tool for visualizing graphs and network diagrams. Sadly the accompanying gvedit tool that is provided with a Windows install leaves a lot to be desired. This is supposed to be a graphical user interface to the Graphviz tool but it is plagued with crashing and lacks some basic modern features such as real-time preview. This article looks at the design and implementation of a replacement for gvedit..."
To read this article and more, subscribe to The F# Journal today!

Friday, 18 September 2015

Automaton Explorer

The F# Journal just published an article about graphics:
"This article walks through the design and implementation of a simple graphical application that allows the user to see all 256 of the elementary one-dimensional cellular automata. Each automaton is initially viewed as a small icon that may be clicked on to expand into a larger detailed view. The application uses Windows Presentation Foundation for all graphics..."
To read this article and more, subscribe to The F# Journal today!

Recording and querying low-latency streamed data

The F# Journal just published an article about data structures:
"Designing and implementing new purely functional collection can be a daunting task. This article looks at the challenge of trying to create a data structure that allows new data to be added as it is streamed in and also allows queries to be made against the data..."
To read this article and more, subscribe to The F# Journal today!