I have the following function in a bash script that fails to return the sorted array. I think the problem lies in the recursion not correctly passing the arrays, but I can't tell what I'm doing wrong. Anyone see the problem?
hi, I was wondering if there was a good way to create an array within a function, where the name is based on a passed argument? I tried this:
_____________________________
func(){
#take in 1st arg as the arrayname
arrayName=$1
let i=0
while read line
do
arrayName=${line}
let i+=1... (5 Replies)
Hi everyone, i need your input on this. We can express a function recursivly like this
A(n) = (2 n = 0
5 n = 1
A(n − 1) + A(n − 2) % 47 n > 1
How would i go about constructing a recursive function for this?... (1 Reply)
Hi all,
I have to move all the files in a tree directory structure to a single directory. Inorder to know which file is from which directory , i'll have to add the name of the directory to the file name. For this i wrote a recursive function which is as follows... (4 Replies)
This is shell script I have made to lists out directory contents and filenames for any given directory (without using ls command). There is some problem in dirfunc function call which I have marked 1 is not working. Can anybody suggest what is the problem there and how should I correct it.
... (2 Replies)
Can someone tell me, how do i write a recursive code using shell ( eg like 'for' loop in C) which outputs the record to a database table as one row per iteration? (7 Replies)
Hi Perl Gurus , need URGENT HELP PLEASE !!!!!
I have one recursive Perl function which takes path of any directory as argument and returns array containing all the sub folders inside it recursively.
Now the problem is that it works well if i use it with one time but the problem is that when... (0 Replies)
Hi, I have a file like this
SPF_HC00001|iCalcular_Monto_Minimo|--->|SPF_HC00028|pstcObtener_Monto_Minimo
SPF_HC00004|iCalcular_Incrementos|--->|SPF_HC00032|pstcObtener_Num_Incrementos
SPF_HC00005|iCalcular_Articulo_167_Reformado|--->|SPF_HC00031|pstcObtener_Por_CB_Inc... (2 Replies)
I am facing some problem in perl recurssive function function
my @array_parent = (Some inegers);
my $outputfile = 'output.txt';
my $master_file = 'master.txt';
open (MASTER,"$>>master.txt");
foreach my $child (@array_parent){
my $line = `grep "$child" "$outputfile"`;
... (1 Reply)
Hi,
I don't know if you can help or if this is even possible, but I am trying to run the following function over an ssh and (depending on the itteration I choose) keep getting unexpected token or undefined symbol errors.
The function is:
killtree()
{
typeset parent=$1
typeset child... (1 Reply)
Hello forum members,
Please wirte a sample program for print the 1 - 100 and 100 -1 using recursive function.
Thanks & regards
Siva Rangnanath (2 Replies)
Discussion started by: workforsiva
2 Replies
LEARN ABOUT CENTOS
cla_syrpvgrw.f
cla_syrpvgrw.f(3) LAPACK cla_syrpvgrw.f(3)NAME
cla_syrpvgrw.f -
SYNOPSIS
Functions/Subroutines
REAL function cla_syrpvgrw (UPLO, N, INFO, A, LDA, AF, LDAF, IPIV, WORK)
CLA_SYRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric indefinite matrix.
Function/Subroutine Documentation
REAL function cla_syrpvgrw (character*1UPLO, integerN, integerINFO, complex, dimension( lda, * )A, integerLDA, complex, dimension( ldaf, * )AF,
integerLDAF, integer, dimension( * )IPIV, real, dimension( * )WORK)
CLA_SYRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric indefinite matrix.
Purpose:
CLA_SYRPVGRW computes the reciprocal pivot growth factor
norm(A)/norm(U). The "max absolute element" norm is used. If this is
much less than 1, the stability of the LU factorization of the
(equilibrated) matrix A could be poor. This also means that the
solution X, estimated condition numbers, and error bounds could be
unreliable.
Parameters:
UPLO
UPLO is CHARACTER*1
= 'U': Upper triangle of A is stored;
= 'L': Lower triangle of A is stored.
N
N is INTEGER
The number of linear equations, i.e., the order of the
matrix A. N >= 0.
INFO
INFO is INTEGER
The value of INFO returned from CSYTRF, .i.e., the pivot in
column INFO is exactly 0.
A
A is COMPLEX array, dimension (LDA,N)
On entry, the N-by-N matrix A.
LDA
LDA is INTEGER
The leading dimension of the array A. LDA >= max(1,N).
AF
AF is COMPLEX array, dimension (LDAF,N)
The block diagonal matrix D and the multipliers used to
obtain the factor U or L as computed by CSYTRF.
LDAF
LDAF is INTEGER
The leading dimension of the array AF. LDAF >= max(1,N).
IPIV
IPIV is INTEGER array, dimension (N)
Details of the interchanges and the block structure of D
as determined by CSYTRF.
WORK
WORK is COMPLEX array, dimension (2*N)
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
September 2012
Definition at line 123 of file cla_syrpvgrw.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 cla_syrpvgrw.f(3)