57 lines
No EOL
5 KiB
HTML
57 lines
No EOL
5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>CLiki: array-operations</title>
|
|
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
|
href="https://www.cliki.net/site/feed/article.atom?title=array-operations">
|
|
<link rel="stylesheet" href="static/css/style.css">
|
|
<link rel="stylesheet" href="static/css/colorize.css">
|
|
</head>
|
|
|
|
<body>
|
|
<span class="hidden">CLiki - array-operations</span>
|
|
<div id="content"><div id="content-area"><div id="article-title">array-operations</div><div id="article">Provides commonly used operations on arrays.<p>Operations provided include elementwise +, -, * and /, the same operations involving an array and a scalar, minimum, maximum and range (the last one is faster then the two of them called separately), and also general functions to implement other, similar functions, including array-reduce, array-map, etc.<p>It also has a macro for `vectorizing' operations:<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/speope_letcm_letst.html" class="symbol"><i><span class="symbol">let</span></i></a> <span class="paren2">(<span class="nonparen"><span class="paren3">(<span class="nonparen">a #<span class="paren4">(<span class="nonparen">1d0 2d0 3d0</span>)</span></span>)</span>
|
|
<span class="paren3">(<span class="nonparen">b #<span class="paren4">(<span class="nonparen">4d0 5d0 6d0</span>)</span></span>)</span>
|
|
<span class="paren3">(<span class="nonparen">c 0.25d0</span>)</span></span>)</span>
|
|
<span class="paren2">(<span class="nonparen">vectorize <span class="paren3">(<span class="nonparen">a b</span>)</span>
|
|
<span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_pl.html" class="symbol">+</a> a b c 0.25</span>)</span></span>)</span></span>)</span> <span class="comment">; => #(5.5d0 7.5d0 9.5d0)
|
|
</span></span></div><p>Formerly, many functions in this package were part of <a href="FFA.html" class="internal">FFA</a>, but were split to eliminate the dependency on <a href="CFFI.html" class="internal">CFFI</a>. With the fix in SBCL, we no longer need to make a special effort to make arrays "foreign friendly".<p>Homepage: <a href="https://github.com/tpapp/array-operations">GitHub</a> (archived original), <a href="https://github.com/bendudson/array-operations">GitHub</a> (an actively maintained fork)<p>License: <a href="MIT.html" class="internal">MIT</a> (as stated in asdf:defsystem; the license text in LICENSE file is boilerplate from another project)<p>See article <a href="https://lispcookbook.github.io/cl-cookbook/arrays.html">Multidimensional arrays</a> in The Common Lisp Cookbook for some differences between the fork and the original.<p><hr>
|
|
<a href="data structure.html" class="category">data structure</a></div></div>
|
|
<div id="footer" class="buttonbar"><ul><li><a href="array-operations.html">Current version</a></li>
|
|
<li><a href="https://www.cliki.net/site/history?article=array-operations">History</a></li>
|
|
<li><a href="https://www.cliki.net/site/backlinks?article=array-operations">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=array-operations&from-revision=3824046272">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
|
</div>
|
|
<div id="header-buttons" class="buttonbar">
|
|
<ul>
|
|
<li><a href="https://www.cliki.net/">Home</a></li>
|
|
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
|
<li><a href="CLiki.html">About</a></li>
|
|
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
|
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
|
</ul>
|
|
<div id="search">
|
|
<form action="https://www.cliki.net/site/search">
|
|
<label for="search_query" class="hidden">Search CLiki</label>
|
|
<input type="text" name="query" id="search_query" value="" />
|
|
<input type="submit" value="search" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div id="pageheader">
|
|
<div id="header">
|
|
<span id="logo">CLiki</span>
|
|
<span id="slogan">the common lisp wiki</span>
|
|
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
|
<label for="login_name" class="hidden">Account name</label>
|
|
<input type="text" name="name" id="login_name" class="login_input" />
|
|
<label for= "login_password" class="hidden">Password</label>
|
|
<input type="password" name="password" id="login_password" class="login_input" />
|
|
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
|
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
|
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body></html> |