For the incomplete methods, we kept the representation of the queens by a table and the method of calculation to determine if two queens are in conflict, which is much faster for this kind of problems than the representation by a Matrix.
heuristics: descent.
Tests: 100 queens in less than 1 second and 67 iterations. 500 queens in 1 second and 257 iterations. 1000 queens in 11 seconds and 492 iterations.
heuristics: Simulated annealing.
Tests: 100 queens in less than 1 second and 47 iterations. 500 queens in 5 seconds and 243 iterations. 1000 queens in 13 seconds and 497 iterations.
heuristics: based on Simulated Annealing.
Tests: 100 queens in less than 1 second and 60 iterations. 500 queens in 1 second and 224 iterations. 1000 queens in 5 seconds and 459 iterations. 10 000 queens in 20 minutes 30 seconds and 4885 iterations.
The module LSQ is for unconstrained linear least-squares fitting. It is
based upon Applied Statistics algorithm AS 274 (see comments at the start
of the module). A planar-rotation algorithm is used to update the QR-
factorization. This makes it suitable for updating regressions as more
data become available. The module contains a test for singularities which
is simpler and quicker than calculating the singular-value decomposition.
An important feature of the algorithm is that it does not square the condition
number. The Matrix X X is not formed. Hence it is suitable for ill-
conditioned problems, such as fitting polynomials.
By taking advantage of the MODULE facility, it has been possible to remove
many of the arguments to routines. Apart from the new function VARPRD,
and a back-substitution routine BKSUB2 which it calls, the routines behave
as in AS 274.
尋找函數(shù)的全局極小值,global minimization of contrast function with random restarts the data are assumed whitened (i.e. with identity covariance Matrix). The output is such that Wopt*x are the independent sources.
Included are the files wav1.m, wav2.m, wavecoef.mat and readme.
wav2 function implements the tree structured wavelet transform of the input Matrix, up to the given level of decomposition. Wav2 uses another function called wav1, which takes the well known wavelet transform of the given Matrix. Daubechies wavelet coefficients are used for wavelet transform operation wahich is saved in wavcoeff.mat.
使用pso求最小化一函數(shù)
matlab程式碼,寫(xiě)的非常簡(jiǎn)潔(不到100行),且還包括了2維的圖形展示,和大家分享參考!!!
一起學(xué)習(xí)matlab和各種optimize methods
最小化:(x-15)^2+(y-20)^2
The swarm Matrix is
swarm(index, [location, velocity, best position, best value], [x, y components or the value component])
Author: Wesam ELSHAMY (wesamelshamy@yahoo.com) MSc Student, Electrical Enginering Dept., Faculty of Engineering Cairo University, Egypt
平均因子分解法,適用于正定矩陣First, let s recall the definition of the Cholesky decomposition: Given a symmetric positive definite square Matrix X, the Cholesky decomposition of X is the factorization X=U U, where U is the square root Matrix of X, and satisfies:
(1) U U = X
(2) U is upper triangular (that is, it has all zeros below the diagonal).
It seems that the assumption of positive definiteness is necessary. Actually, it is "positive definite" which guarantees the existence of such kind of decomposition.
unix或linux下的DNA分析軟件源碼
其功能如下
1. Edit up to 256 peptide or DNA sequences simultaneously.
2. Translates DNA->protein click next to display next frame.
3. Dot Matrix plot of any 2 sequences.
4. Rudimentary amino acid statistics (MW and amino acid percentage)
5. Saves Matrix plot as PBM image format.
6. Sequence reversal.
7. Creates alignment file for highlight (below).
8. Tab key toggles editing of next sequence.