{"id":21744632,"url":"https://github.com/github0null/mesch","last_synced_at":"2025-04-13T05:12:08.944Z","repository":{"id":100179784,"uuid":"381231884","full_name":"github0null/mesch","owner":"github0null","description":"meschach:  C 矩阵库，可用于单片机系统，源码来自: http://homepage.divms.uiowa.edu/~dstewart/meschach/)","archived":false,"fork":false,"pushed_at":"2022-09-17T02:37:38.000Z","size":290,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T22:04:32.344Z","etag":null,"topics":["c","library","matrix","mcu","meschach","stm32"],"latest_commit_sha":null,"homepage":"http://homepage.divms.uiowa.edu/~dstewart/meschach/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github0null.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-29T03:51:17.000Z","updated_at":"2024-09-23T08:25:30.000Z","dependencies_parsed_at":"2023-05-12T17:45:39.228Z","dependency_job_id":null,"html_url":"https://github.com/github0null/mesch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fmesch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fmesch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fmesch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0null%2Fmesch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github0null","download_url":"https://codeload.github.com/github0null/mesch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665744,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","library","matrix","mcu","meschach","stm32"],"created_at":"2024-11-26T07:12:10.135Z","updated_at":"2025-04-13T05:12:08.938Z","avatar_url":"https://github.com/github0null.png","language":"C","readme":"\n\n\t\t\t\t     \n\t\t\t     Meschach Library\n\t\t\t       Version 1.2b\n\n\n\t\t\t     David E. Stewart\n\t\t\t(david.stewart@anu.edu.au)\n\n\t\t\t\t    and\n\n\t\t\t       Zbigniew Leyk\n\t\t\t(zbigniew.leyk@anu.edu.au)\n\n\t\t      School of Mathematical Sciences\n\t\t      Australian National University\n\t\t\t     Canberra ACT 0200\n\t\t\t\t Australia\n\n\n\t\t      [last revised: 6th April, 1994]\n\n\n\t\t\t      1. INTRODUCTION\n\n   The Meschach Library is a numerical library of C routines for performing\ncalculations on matrices and vectors. It is intended for solving systems of\nlinear equations (dense and sparse), solve least squares problems,\ncomputing eigenvalues and eigenvectors, etc. We do not claim that it\ncontains every useful algorithm in numerical linear algebra, but it does\nprovide a basis on which more advanced algorithms can be built. The library\nis for people who know something about the C programming language,\nsomething of how to solve the numerical problem they are faced with but do\nnot want to have the hassle of building all the necessary routines from the\nscratch. The library is not a loose collection of numerical routines but it\ncomprises a coherent system. The current version is enhanced with many\nfeatures comparing with previous versions. Since the memory requirements\nare nontrivial for large problems we have paid more attention to\nallocation/deallocation of memory.\n\n   The source code is available to be perused, used and passed on without\ncost, while ensuring that the quality of the software is not compromised.\nThe software is copyrighted; however, the copyright agreement follows in\nthe footsteps of the Free Software Foundation in preventing abuse that\noccurs with totally public domain software.\n\n   Detailed instructions for installing Meschach are contained below.\n\n   Pronunciation: if in doubt, say \"me-shark\".  This is close enough.\nDon't ask us \"Why call it that?\"  Have a look at the quote at the front of\nthe manual.\n\n\n\t\t\t      2. AVAILABILITY\n\n    The authors make this code openly available to others, in the hope that\nit will prove to be a useful tool.  We ask only that:\n\n* If you publish results obtained using Meschach, please consider\n  acknowledging the source of the code.\n\n* If you discover any errors in the code, please promptly communicate them\n  to the authors.\n\n    We also suggest that you send email to the authors identifying yourself\nas a user of Meschach; this will enable the authors to notify you of any\ncorrections/improvements in Meschach.\n\n\n\n\t\t\t     3. HOW TO GET IT\n\n   There are several different forms in which you might receive Meschach.\nTo provide a shorthand for describing collections of files, the Unix\nconvention of putting alternative letters in [...] will be used.  (So,\nfred[123] means the collection fred1, fred2 and fred3.)  Meschach is\navailable over Internet/AARnet via netlib, or at the anonymous ftp site\nthrain.anu.edu.au in the directory pub/meschach.  There are five .shar\nfiles: meschach[01234].shar (which contain the library itself),\nmeschach0.shar (which contains basic documentation and machine dependent\nfiles for a number of machines).  Of the meschach[1234].shar files, only\nmeschach[12].shar are needed for the basic Meschach library; the third\n.shar file contains the sparse matrix routines, and the the fourth contains\nthe routines for complex numbers, vectors and matrices.  There is also a\nREADME file that you should get from meschach0.shar.\n\n   If you need the old iterative routines, the file oldmeschach.shar\ncontains the files conjgrad.c, arnoldi.c and lanczos.c.\n\n   To get the library from netlib,\n\nmail netlib@research.att.com\nsend all from c/meschach\n\n   There are a number of other netlib sites which mirror the main netlib\nsites.  These include netlib@ornl.gov (Oak Ridge, TN, USA), netlib@nac.no\n(Oslo, Norway), ftp.cs.uow.edu.au (Wollongong, Australia; ftp only),\nnetlib@nchc.edu.tw (Taiwan), elib.zib-berlin.de (Berlin, Germany; ftp\nonly).  (For anonymous ftp sites the directory containing the Meschach\n.shar files is pub/netlib/c/meschach or similar, possibly depending on the\nsite.)\n\n   Meschach is available in other forms on thrain.anu.edu.au by ftp in the\ndirectory pub/meschach.  It is available as a .tar file (mesch12a.tar for\nversion 1.2a), or as a collection of .shar files, or as a .zip file.  The\n.tar and .zip versions each contain the entire contents of the Meschach\nlibrary.\n\n   There is a manual called \"Meschach: Matrix Computations in C\" which has\nbeen published by\n\n\tCentre for Mathematics and its Applications\n\tSchool of Mathematical Sciences\n\tAustralian National University\n\tCanberra, ACT 0200\n\tAustralia\n\nand costs A$30 (about US$22) + postage/handling.  You can order it by\nwriting there or you can send email messages to one of us\n(david.stewart@anu.edu.au or zbigniew.leyk@anu.edu.au) and we can pass it\non.\n\n   If you don't have any money, as a stop gap you can get the **OLD**\nmanual, although it is out of date, by anonymous ftp from\n\n\tthrain.anu.edu.au : /pub/meschach/version1.1b/bookdvi.tar [.Z or .gz]\n\nIn addition, don't forget that the distribution includes a DOC directory\nwhich contains tutorial.txt and fnindex.txt which are respectively, the\ntutorial chapter (text version) and the function index (text version).\n\n\n\n\t\t\t      4. INSTALLATION\n\n\t\t\t    a) On Unix machines\n\n   To extract the files from the .shar files, put them all into a suitable\ndirectory and use\n\n  sh \u003cfile\u003e.shar\n\nto expand the files.  (Use one sh command per file; sh *.shar will not work\nin general.)\n\n   For the .tar file, use\n\n  tar xvf mesch12a.tar\n\nand for the .zip file use\n\n  unzip mesch12a.zip\n\n   On a Unix system you can use the configure script to set up the\nmachine-dependent files.  The script takes a number of options which are\nused for installing different subsets of the full Meschach.  For the basic\nsystem, which requires only meschach[012].shar, use\n\n  configure\n  make basic\n  make clean\n\n   For including sparse operations, which requires meschach[0123].shar, use\n\n  configure --with-sparse\n  make sparse\n  make clean\n\n  For including complex operations, which requires meschach[0124].shar, use\n\n  configure --with-complex\n  make complex\n  make clean\n\n   For including everything, which requires meschach[01234].shar, use\n\n  configure --with-all\n  make all\n  make clean\n\n  To compile the complete library in single precision (with Real equivalent\nto float), add the --with-float option to configure, use\n\n  configure --with-all --with-float\n  make all\n  make clean\n\n\n   Some Unix-like systems may have some problems with this due to bugs or\nincompatibilities in various parts of the system.  To check this use make\ntorture and run torture.  In this case use the machine-dependent files from\nthe machines directory.  (This is the case for RS/6000 machines, the -O\nswitch results in failure of a routine in schur.c.  Compiling without the\n-O switch results in correct results.)\n\n   If you have problems using configure, or you use a non-Unix system,\ncheck the MACHINES directory (generated by meschach0.shar) for your\nmachine, operating system and/or compiler.  Save the machine dependent\nfiles makefile, machine.c and machine.h.  Copy those files from the\ndirectory for your machine to the directory where the source code is.\n\n   To link into a program prog.c, compile it using\n\n  cc -o prog_name prog.c ....(source files).... meschach.a -lm\n\n\n   This code has been mostly developed on the University of Queensland,\nAustralia's Pyramid 9810 running BSD4.3.  Initial development was on a\nZilog Zeus Z8000 machine running Zeus, a Unix workalike operating system.\nVersions have also been successfully used on various Unix machines\nincluding Sun 3's, IBM RT's, SPARC's and an IBM RS/6000 running AIX.  It\nhas also been compiled on an IBM AT clone using Quick C.  It has been\ndesigned to compile under either Kernighan and Richie, (Edition 1) C and\nunder ANSI C.  (And, indeed, it has been compiled in both ANSI C and\nnon-ANSI C environments.)\n\n\n\t\t\t  b) On non-Unix machines\n\n   First look in the machines directory for your system type.  If it is\nthere, then copy the machine dependent files machine.h, makefile (and\npossibly machine.c) to the Meschach directory.\n\n   If your machine type is not there, then you will need to either compile\n``by hand'', or construct your own makefile and possibly machine.h as well.\nThe machine-dependent files for various systems should be used as a\nstarting point, and the ``vanilla'' version of machine.h should be used.\nInformation on the machine-dependent files follows in the next three\nsubsections.\n\n   On an IBM PC clone, the source code would be on a floppy disk. Use\n\n  xcopy a:* meschach\n\nto copy it to the meschach directory.  Then ``cd meschach'', and then\ncompile the source code.  Different compilers on MSDOS machines will\nrequire different installation procedures.  Check the directory meschach\nfor the appropriate ``makefile'' for your compiler.  If your compiler is\nnot listed, then you should try compiling it ``by hand'', modifying the\nmachine-dependent files as necessary.\n\n   Worst come to worst, for a given C compiler, execute\n\t\t\u003cC compiler name\u003e *.c\non MS-DOS machines. For example,\n\t\ttcc *.c\nfor Turbo C, and\n\t\tmsc *.c\nfor Microsoft C, or if you are using Quick C,\n\t\tqcl *.c\nand of course\n\t\tcc *.c\nfor the standard Unix compiler.\n\n   Once the object files have been generated, you will need to combine them\ninto a library. Consult your local compiler's manual for details of how to\ndo this.\n\n   When compiling programs/routines that use Meschach, you will need to\nhave access the the header files in the INCLUDE directory. The INCLUDE\ndirectory's contents can be copied to the directory where the\nprograms/routines are compiled.\n\n   The files in the DOC directory form a very brief form of documentation\non the the library routines in Meschach. See the printed documentation for\nmore comprehensive documentation of the Meschach routines.  This can be\nobtained from the authors via email.\n\n   The files and directories created by the machines.shar shell archive\ncontain the files machine.c machine.h and makefile for a particular\nmachine/operating system/compiler where they need to be different.  Copy\nthe files in the appropriate directory for your machine/operating\nsystem/compiler to the directory with the Meschach source before compiling.\n\n\n\n\t\t\t       c)  makefile\n\n\n   This is setup by using the configure script on a Unix system, based on\nthe makefile.in file.  However, if you want to modify how the library is\ncompiled, you are free to change the makefile.\n\n   The most likely change that you would want to make to this file is to\nchange the line\n\n  CFLAGS = -O\n\nto suit your particular compiler.\n\n  The code is intended to be compilable by both ANSI and non-ANSI\ncompilers.\n\n   To achieve this portability without sacrificing the ANSI function\nprototypes (which are very useful for avoiding problems with passing\nparameters) there is a token ANSI_C which must be #define'd in order to\ntake full advantage of ANSI C.  To do this you should do all compilations\nwith\n\n  #define ANSI_C 1\n\n   This can also be done at the compilation stage with a -DANSI_C flag.\nAgain, you will have to use the -DANSI_C flag or its equivalent whenever\nyou compile, or insert the line\n\n  #define ANSI_C 1\n\nin machine.h, to make full use of ANSI C with this matrix library.\n\n\n\t\t\t       d)  machine.h\n\n   Like makefile this is normally set up by the configure script on Unix\nmachines.  However, for non-Unix systems, or if you need to set some things\n``by hand'', change machine.h.\n\n   There are a few quantities in here that should be modified to suit your\nparticular compiler.  Firstly, the macros MEM_COPY() and MEM_ZERO() need to\nbe correctly defined here.  The original library was compiled on BSD\nsystems, and so it originally relied on bcopy() and bzero().\n\n   In machine.h you will find the definitions for using the standard ANSI C\nlibrary routines:\n\n  /*--------------------ANSI C--------------------*/\n  #include        \u003cstddef.h\u003e\n  #include        \u003cstring.h\u003e\n  #define\tMEM_COPY(from,to,size)  memmove((to),(from),(size))\n  #define\tMEM_ZERO(where,size)    memset((where),'\\0',(size))\n\n   Delete or comment out the alternative definitions and it should compile\ncorrectly.  The source files containing memmove() and/or memset() are\navailable by anonymous ftp from some ftp sites (try archie to discover \nthem). The files are usually called memmove.c or memset.c.\nSome ftp sites which currently (Jan '94) have a version of these files are\nmunnari.oz.au (in Australia), ftp.uu.net, gatekeeper.dec.com (USA), and\nunix.hensa.ac.uk (in the UK).  The directory in which you will find\nmemmove.c and memset.c typically looks like .../bsd-sources/lib/libc/...\n\n   There are two further machine-dependent quantities that should be set.\nThese are machine epsilon or the unit roundoff for double precision\narithmetic, and the maximum value produced by the rand() routine, which is\nused in rand_vec() and rand_mat().\n\n\n   The current definitions of these are\n\n  #define\tMACHEPS\t2.2e-16\n  #define\tMAX_RAND 2.147483648e9\n\n   The value of MACHEPS should be correct for all IEEE standard double\nprecision arithmetic.\n\n   However, ANSI C's \u003cfloat.h\u003e contains #define'd quantities DBL_EPSILON\nand RAND_MAX, so if you have an ANSI C compiler and headers, replace the\nabove two lines of machine.h with\n\n  #include \u003cfloat.h\u003e\n  /* for Real == float */\n  #define MACHEPS DBL_EPSILON\n  #define MAX_RAND RAND_MAX\n\n   The default value given for MAX_RAND is 2^31 , as the Pyramid 9810 and\nthe SPARC 2's both have 32 bit words.  There is a program macheps.c which\nis included in your source files which computes and prints out the value of\nMACHEPS for your machine.\n\n   Some other macros control some aspects of Meschach.  One of these is\nSEGMENTED which should be #define'd if you are working with a machine or\ncompiler that does not allow large arrays to be allocated.  For example,\nthe most common memory models for MS-DOS compilers do not allow more than\n64Kbyte to be allocated in one block.  This limits square matrices to be no\nmore than 9090 .  Inserting #define SEGMENTED 1 into machine.h will mean\nthat matrices are allocated a row at a time.\n\n\n\n\t\t\t      4. SAMPLE TESTS\n\n    There are several programs for checking Meschach called torture\n(source: torture.c) for the dense routines, sptort (source: sptort.c) for\nthe sparse routines, ztorture (source ztorture.c) for a complex version of\ntorture, memtort (source memtort.c) for memory allocation/deallocation,\nitertort (source itertort.c) for iterative methods, mfuntort (source\nmfuntort.c) for computing powers of dense matrices, iotort (source\niotort.c) for I/O routines.  These can be compiled using make by \"make\ntorture\", \"make sptort\", etc.  The programs are part of meschach0.shar.\n\n\n\t\t\t     5. OTHER PROBLEMS\n\n   Meschach is not a commercial package, so we do not guarantee that\neverything will be perfect or will install smoothly.  Inevitably there will\nbe unforeseen problems. If you come across any bugs or inconsistencies, please\nlet us know.  If you need to modify the results of the configure script, or\nneed to construct your own machine.h and makefile's, please send them to\nus.  A number of people sent us the machine dependent files for Meschach 1.1,\nbut with the use of configure, and the new information needed for version\n1.2, these machine dependent files don't have quite the right information.\nHopefully, though, they are redundant.  Non-Unix platforms at present\nrequire ``manual'' installation.  Because of the variety of platforms\n(MS-DOS, Macintosh, VAX/VMS, Prime, Amiga, Atari, ....) this is left up to\nthe users of these platforms.  We hope that you can use the distibutable\nmachine-dependent files as a starting point for this task.\n\n   If you have programs or routines written using Meschach v.1.1x, you\nshould put the statement\n\n   #include \"oldnames.h\"\n\nat the beginning of your files.  This is because a large number of the\nnames of the routines have been changed (e.g. \"get_vec()\" has become\n\"v_get()\").  This will enable you to use the old names, although all of the\nerror messages etc., will use the new names.  Also note that the new\niterative routines have a very different calling sequence.  If you need the\nold iterative routines, they are in oldmeschach.shar.\n\n   If you wish to let us know what you have done, etc., our email\naddresses are\n\n\t\t\t david.stewart@anu.edu.au\n\t\t\t zbigniew.leyk@anu.edu.au\n\n    Good luck!\n \n\n\t\t\t      ACKNOWLEDGMENTS\n\n\n    Many people have helped in various ways with ideas and suggestions.\nNeedless to say, the bugs are all ours!  But these people should be thanked\nfor their encouragement etc.  These include a number of people at\nUniversity of Queensland: Graeme Chandler, David De Wit, Martin Sharry,\nMichael Forbes, Phil Kilby, John Holt, Phil Pollett and Tony Watts.  At the\nAustralian National University: Mike Osborne, Steve Roberts, Margaret Kahn\nand Teresa Leyk.  Karen George of the University of Canberra has been a\nsource of both ideas and encouragement.  Email has become significant part\nof work, and many people have pointed out bugs, inconsistencies and\nimprovements to Meschach by email.  These people include Ajay Shah of the\nUniversity of Southern California, Dov Grobgeld of the Weizmann Institute,\nJohn Edstrom of the University of Calgary, Eric Grosse, one of the netlib\norganisers, Ole Saether of Oslo, Norway, Alfred Thiele and Pierre\nAsselin of Carnegie-Mellon Univeristy, Daniel Polani of the University of\nMainz, Marian Slodicka of Slovakia, Kaifu Wu of Pomona, Hidetoshi\nShimodaira of the University of Tokyo, Eng Siong of Edinburgh, Hirokawa Rui\nof the University of Tokyo, Marko Slyz of the University of Michigan, and\nBrook Milligan of the University of Texas.  This list is only partial, and\nthere are many others who have corresponded with us on details about\nMeschach and the like.  Finally our thanks go to all those that have had to\nstruggle with compilers and other things to get Meschach to work.\n\n\t\t\t\t     \n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0null%2Fmesch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub0null%2Fmesch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0null%2Fmesch/lists"}