E-Book Content
C4304_TitlePage 6/26/03 8:46 AM Page 1 CHAPMAN & HALL/CRC A CRC Press Company Boca Raton London New York Washington, D.C. © 2004 by Chapman & Hall/CRC C4304_Disclaimer Page 1 Monday, July 21, 2003 10:43 AM Cover design by Vill Mak Library of Congress Cataloging-in-Publication Data Lau, H. T. (Hang Tong), 1952A numerical library in Java for scientists and engineers / Hang T. Lau. p. cm. Includes bibliographical references and index. ISBN 1-58488-430-4 (alk. paper) 1. Java (Computer program language) I. Title. QA76.73.J38L363 2003 005.13′3—dc21 2003055149 This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior permission in writing from the publisher. The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating new works, or for resale. Specific permission must be obtained in writing from CRC Press LLC for such copying. Direct all inquiries to CRC Press LLC, 2000 N.W. Corporate Blvd., Boca Raton, Florida 33431. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation, without intent to infringe. Visit the CRC Press Web site at www.crcpress.com © 2004 by Chapman & Hall/CRC No claim to original U.S. Government works International Standard Book Number 1-58488-430-4 Library of Congress Card Number 2003055149 Printed in the United States of America 1 2 3 4 5 6 7 8 9 0 Printed on acid-free paper © 2004 by Chapman & Hall/CRC To my dearest wife, Helen, and our children Matthew, Lawrence, and Tabia for their patience, love, and support © 2004 by Chapman & Hall/CRC The Author Hang T. Lau is a faculty lecturer in the Department of Career and Management Studies, Centre for Continuing Education, McGill University, Montreal, Canada. Dr. Lau has over twenty years of industrial experience in research and development of telecommunication. © 2004 by Chapman & Hall/CRC Contents INTRODUCTION 1. ELEMENTARY PROCEDURES 1.1 Real vector and matrix Initialization A. inivec B. inimat C. inimatd D. inisymd E. inisymrow 1.2 Real vector and matrix Duplication A. dupvec B. dupvecrow C. duprowvec D. dupveccol E. dupcolvec F. dupmat 1.3 Real vector and matrix Multiplication A. mulvec B. mulrow C. mulcol D. colcst E. rowcst 1.4 Real vector vector products A. vecvec B. matvec C. tamvec. D. matmat E. tammat F. mattam G. seqvec H. scaprd1 I. symmatvec 1.5 Real matrix vector products A. fulmatvec B. fultamvec C. fulsymmatvec © 2004 by Chapman & Hall/CRC D. resvec E. symresvec 1.6 Real matrix matrix products A. hshvecmat B. hshcolmat C. hshrowmat D. hshvectam E. hshcoltam F. hshrowtam 1.7 Real vector and matrix Elimination A. elmvec B. elmcol C. elmrow D. elmveccol E. elmcolvec F. elmvecrow G. elmrowvec H. elmcolrow I. elmrowcol J. maxelmrow 1.8 Real vector and matrix Interchanging A. ichvec B. ichcol C. ichrow D. ichrowcol E. ichseqvec F. ichseq 1.9 Real vector and matrix Rotation A. rotcol B. rotrow 1.10 Real vector and matrix Norms A. infnrmvec B. infnrmrow C. infnrmcol D. infnrmmat E. onenrmvec F. onenrmrow G. onenrmcol H. onenrmmat I. absmaxmat 1.11 Real vector and matrix Scaling reascl © 2004 by Chapman &