Hi Guys,
the requirement is like this,
i am having a error log file in this format,
4594.493: parallel nursery GC 2594592K->2544691K (2969600K), 30.848 ms
4605.958: parallel nursery GC 2634887K->2584986K (2969600K), 38.900 ms
4619.079: parallel nursery GC 2822555K->2774812K... (12 Replies)
firstly, i check is the variable empty or not, if so
vesselNameList=`echo $vesselName`
if not
vesselNameList="${vesselNameList}""\n"`echo "$vesselName"`
and it produces this result
BUNGA TERATAI 3 5055\
JADE TRADER 143W\
MOL SPLENDOR 0307A
BUNGA TERATAI 3 5055\
JADE... (1 Reply)
Hi i am trying to append value with 0 to an existing file in the position 50-56 & 58-64 only where empty space is there
Rule:
1 row already has some value and i do not want to change anything for this row.
2nd record below you see the position 50-64 is empty, i want to replace with 0000000... (3 Replies)
Hi all,
I want to check whether tar file exists in the directory or not. If tar file exists in the directory then I want to append the files to it.
I am using the below command to tar files if the file does not exist.
tar zcvf <tar file name> <Files to append>
However, if want to... (4 Replies)
Evening all !
I would like to ask your expertise on how to accomplish the following ;
I have 2 lists, and would like each line from list2 to be appended to each line in list1, resulting in list3 ;
List1;
alpha
beta
charlie
List2;
one
two
three (4 Replies)
Hi,
I need help for below scenario.I have a flat file which is having records seperated by delimiters which will represent each record for oracle table.My Control file will consider each line as one record for that table. Some of the lines are aligned in two/three lines so that records are... (4 Replies)
Hello All,
I have the following code in PERL to write data to excel sheet.
Can someone please help me about how to append data to an exisitng cell?
For ex in the below given case,Cell 1,1 has Active State PERL
Now I want to add a new line like "prorgamming" without overwritting the... (3 Replies)
Good evening
I have the below requirements, as I am not an experts in Linux/Unix and am looking for your ideas how I can do this.
I have file called file1 and file2.
I need to get the second column which is text1_random_alphabets and find that in file 2, if it's exists then print the 3rd... (4 Replies)
Hi,
i have a file with multiple entries. After some tests with sed i managed to get the file output as follows:
lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1,
00,2110597,2094790,0,81,529,75649011,56435363,
lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 Replies
LEARN ABOUT REDHAT
pdl::opt::simplex
Simplex(3) User Contributed Perl Documentation Simplex(3)NAME
PDL::Opt::Simplex -- Simplex optimization routines
SYNOPSIS
use PDL::Opt::Simplex;
($optimum,$ssize) = simplex($init,$initsize,$minsize,
$maxiter,
sub {evaluate_func_at($_[0])},
sub {display_simplex($_[0])}
);
DESCRIPTION
This package implements the commonly used simplex optimization algorithm. The basic idea of the algorithm is to move a "simplex" of N+1
points in the N-dimensional search space according to certain rules. The main benefit of the algorithm is that you do not need to calculate
the derivatives of your function.
$init is a 1D vector holding the initial values of the N fitted parameters, $optimum is a vector holding the final solution.
$initsize is the size of $init (more...)
$minsize is some sort of convergence criterion (more...) - e.g. $minsize = 1e-6
The sub is assumed to understand more than 1 dimensions and threading. Its signature is 'inp(nparams); [ret]out()'. An example would be
sub evaluate_func_at {
my($xv) = @_;
my $x1 = $xv->slice("(0)");
my $x2 = $xv->slice("(1)");
return $x1**4 + ($x2-5)**4 + $x1*$x2;
}
Here $xv is a vector holding the current values of the parameters being fitted which are then sliced out explicitly as $x1 and $x2.
$ssize gives a very very approximate estimate of how close we might be - it might be miles wrong. It is the euclidean distance between the
best and the worst vertices. If it is not very small, the algorithm has not converged.
FUNCTIONS
simplex
Simplex optimization routine
($optimum,$ssize) = simplex($init,$initsize,$minsize,
$maxiter,
sub {evaluate_func_at($_[0])},
sub {display_simplex($_[0])}
);
See module "PDL::Opt::Simplex" for more information.
CAVEATS
Do not use the simplex method if your function has local minima. It will not work. Use genetic algorithms or simulated annealing or conju-
gate gradient or momentum gradient descent.
They will not really work either but they are not guaranteed not to work ;) (if you have infinite time, simulated annealing is guaranteed
to work but only after it has visited every point in your space).
SEE ALSO
Ron Shaffer's chemometrics web page and references therein: "http://chem1.nrl.navy.mil/~shaffer/chemoweb.html".
Numerical Recipes (bla bla bla XXX ref).
The demonstration (Examples/Simplex/tsimp.pl and tsimp2.pl).
AUTHOR
Copyright(C) 1997 Tuomas J. Lukka. All rights reserved. There is no warranty. You are allowed to redistribute this software / documenta-
tion under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribu-
tion, the copyright notice should be included in the file.
perl v5.8.0 2000-05-30 Simplex(3)