Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
array.c
Package: leda.tar.gz [view]
Upload User: gzelex
Upload Date: 2007-01-07
Package Size: 707k
Code Size: 1k
Category:
Mathimatics-Numerical algorithms
Development Platform:
MultiPlatform
- #include <LEDA/array.h>
- #include <LEDA/array2.h>
- int cmp_inv(const string& x, const string& y)
- { return compare(y,x); }
- main()
- {
- array<string> A(1,10);
- int i;
- int j;
- A.read("A(1,10) = ");
- A.permute();
- A.print("permuted:n");
- newline;
- cout << "sort subarray [i..j]n";
- i = read_int("i = ");
- j = read_int("j = ");
- A.sort(i,j);
- A.print("A =n");
- newline;
- A.sort(cmp_inv);
- A.print("sorted decreasinglyn");
- newline;
- newline;
- array2<double> B(1,10,1,10);
- for(i=1;i<=10;i++)
- for(j=1;j<=10;j++) B(i,j) = 0.12345*i*j;
- for(i=1;i<=10;i++)
- { for(j=1;j<=10;j++) cout << string("%6.2f ",B(i,j));
- newline;
- }
- return 0;
- }