This Delphi 4.0 example uses the MapX Ver 4.0 OCX Control. The main goal of this example is
to show the use of the new object editing capabilities in MapX Ver 3.51. The program show how
to perform functions such as adding a new layer adding Lines and
points, and editing a layers data.
A graphics toolkit, Graf_Tool() is developed which can be used
to process and edit graphics. Labels, Lines and arrows can be
added and the program is very flexible and easy to use.
A program to demonstrate the optimization process of particle swarm optimization. A two-dimensional objective function is visualized by level of grey: the lighter the color, the higher the function value. The particles are shown as red circles, their trajectory as red Lines.
A program to demonstrate the optimization process of ant colony optimization for the traveling saleman problem (TSP). The cities are shown as red circles, the pheromone on the connections between them (fully connected graph) by gray Lines. The darker the grey, the more pheromone is currently on the edge. During the optimization, the currently best found tour is drawn in red. To run the optimization, first create a random TSP, then create an ant colony, and finally run the optimization.
LINEINTRGAL Line Integral in a 2D Vector Field.
LINEINTRGAL(X,Y,U,V,C) computes the line integral along the Lines given in cell array C.
X and Y define the coordinates of a rectangular grid over which
U and V are defined. X and Y must be monotonic and 2D plaid as
% produced by MESHGRID. X, Y, U, and V must all be the same size.
Implemented BFS, DFS and A*
To compile this project, use the following command:
g++ -o search main.cpp
Then you can run it:
./search
The input is loaded from a input file in.txt
Here is the format of the input file:
The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm.
The second line of input file shoud be an integer m indicate the number of connections for the map.
Following m Lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist.
The following input are for A*
The following line contains two chars indicate the source and destination city for A* algorithm.
Then there is an integer h indicate the number of heuristic.
The following h Lines is in the form: city dist which means the straight-line distance from the city to B is dist.
OReilly.Ajax.on.Rails.Dec.2006. ISBN-10: 0-596-52744-6.
Learn to build dynamic, interactive web applications using the two most important approaches to web development today: Ajax and the phenomenally efficient Ruby on Rails platform. This book teaches intermediate to advanced web developers how to use both Ajax and Rails to quickly build high-performance, scalable applications without being overwhelmed with thousands of Lines of JavaScript code. More than just recipes, you also get a thorough, low-level understanding of what s happening under the hood.
We often get questions about how the deflate() and inflate() functions should be used. Users wonder when they should provide more input, when they should use more output, what to do with a Z_BUF_ERROR, how to make sure the process terminates properly, and so on. So for those who have read zlib.h (a few times), and would like further edification, below is an annotated example in C of simple routines to compress and decompress from an input file to an output file using deflate() and inflate() respectively. The annotations are interspersed between Lines of the code. So please read between the Lines. We hope this helps explain some of the intricacies of zlib.