Hello! Iam trying to reverse my order of quicksort in C from asc order (1-99) that is the original way of the algoritm, to descending (99-1). I've tried so many ways that iam a kind of lost now!:s
The original quicksort is:
Thanks for all! Good work!
Last edited by rafazz; 05-16-2010 at 03:21 PM..
Reason: forget to mention the language
Anyone know where you can purchase a 5.1 cd set? IBM no longer ships this out and do not have a set. I have a burned copy, but would be nice to have the originals. I'd like to send my copies offsite for DR once i get an original set.
Thanks! (2 Replies)
in csh
set x = "/home/usr/dir1/file1"
if i do:
echo $x | awk -F\/ '{print $NF}'
will result to:
"file1"
how do i invert the output to:
"/home/usr/dir1"
:confused: (2 Replies)
I have columnar data in arrays perl, Example -
@a = (1,2,3);
@array1 = (A,B,C);
@array2 = (D,E,F);
@array3 = (I,R,T);
I want the data to be formatted and printed as
1 A D I
2 B E F
3 C F T
and so on... (8 Replies)
Good evening
I have a file as below and want to change the order, as in the second column, sed awk Pearl
Thanks
aaaaaaaaaa
bbbbbbbbb
cccccccc
aaaaaaaaaa
bbbbbbbbb
cccccccc
aaaaaaaaaa
cccccccc
bbbbbbbbb
aaaaaaaaaa
cccccccc
bbbbbbbbb (8 Replies)
Hi I have Ubuntu 10.10 installed. I want to change boot order.
Can anyone tell where is menu.lst file located. I searched it but didn't get it. Please tell me what file I need to edit for same? (3 Replies)
Hi guys,
I have a script in which it simply do a grep of strings for the var/adm/messages file:
NEWDATE=`TZ=GMT+1 date +%b" "%d" "%H`
getalarm1=`grep "sent to primary BE" /var/adm/messages* | grep "$NEWDATE" | wc -l`
getalarm2=`grep "CC-Request-Type 3 received in state Idle"... (5 Replies)
Hi ,
I have around 1000000 odd lines in a file in random order.
The file looks like this:
>string102
>string10437183
>string514
>string10435771
>string10437259
>string1049931
>string1342
I want to arrange it in increasing order:
>string102
>string514
>string1342... (3 Replies)
select to_char(cre_on, 'ddmm hh24'), proc_flg, count(*) from ib_prd.tb_ibmh_msg_log where message_type = 'DECHECK_OUT'
and cre_on > to_date('27/08/2016 00:00:00', 'dd/MM/yyyy hh24:mi:ss')
group by to_char(cre_on, 'ddmm hh24'), proc_flg
order by 1;
1) what does order by 1 means
2) group by... (1 Reply)
Discussion started by: houmingc
1 Replies
LEARN ABOUT DEBIAN
dia
dia(2rheolef) rheolef-6.1 dia(2rheolef)NAME
dia - diagonal matrix
DESCRIPTION
The class implements a diagonal matrix. A declaration whithout any parametrers correspond to a null size matrix:
dia<Float> d;
The constructor can be invocated whith a ownership parameter (see distributor(2)):
dia<Float> d(ownership);
or an initialiser, either a vector (see vec(2)):
dia<Float> d(v);
or a csr matrix (see csr(2)):
dia<Float> d(a);
The conversion from dia to vec or csr is explicit.
When a diagonal matrix is constructed from a csr matrix, the definition of the diagonal of matrix is @emph{always} a vector of size
row_ownership which contains the elements in rows 1 to nrow of the matrix that are contained in the diagonal. If the diagonal element
falls outside the matrix, i.e. ncol < nrow then it is defined as a zero entry.
PRECONDITIONER INTERFACE
The class presents a preconditioner interface, as the solver(2), so that it can be used as preconditioner to the iterative solvers suite
(see pcg(4)).
IMPLEMENTATION
template<class T, class M = rheo_default_memory_model>
class dia : public vec<T,M> {
public:
// typedefs:
typedef typename vec<T,M>::size_type size_type;
typedef typename vec<T,M>::iterator iterator;
typedef typename vec<T,M>::const_iterator const_iterator;
// allocators/deallocators:
explicit dia (const distributor& ownership = distributor(),
const T& init_val = std::numeric_limits<T>::max());
explicit dia (const vec<T,M>& u);
explicit dia (const csr<T,M>& a);
dia<T,M>& operator= (const T& lambda);
// preconditionner interface: solves d*x=b
vec<T,M> solve (const vec<T,M>& b) const;
vec<T,M> trans_solve (const vec<T,M>& b) const;
};
template <class T, class M>
dia<T,M> operator/ (const T& lambda, const dia<T,M>& d);
template <class T, class M>
vec<T,M> operator* (const dia<T,M>& d, const vec<T,M>& x);
SEE ALSO distributor(2), vec(2), csr(2), solver(2), pcg(4)rheolef-6.1 rheolef-6.1 dia(2rheolef)