[英]Meaning of @ in octave forge function reference
I'm using some packages from from Octave Forge .我正在使用来自Octave Forge的一些包。 In the API documentation some of the functions are prefixed with
@<AnOtherName>/..
在 API 文档中,一些函数的前缀为
@<AnOtherName>/..
As Example:例如:
@lti/c2d
What is the meaning of this prefix with @ and the additional name?这个带有@的前缀和附加名称是什么意思? What is the difference to "normal" functions?
与“正常”功能有什么区别?
lti
is a class, @lti/c2d
refers to the c2d
method of the lti
class. lti
是 class, @lti/c2d
指的是lti
class 的c2d
方法。
In old-style class definitions, class methods for a class lti
are M-files in a directory called @lti
, so the c2d
method would be defined in a file @lti/c2d.m
.在旧式 class 定义中,class
lti
的 class 方法是名为@lti
的目录中的 M 文件,因此c2d
方法将在文件@lti/c2d.m
中定义。
New-style class definitions use a single classdef
file to define all methods, but it is still possible to override functions for a specific class or type by creating M-files in a directory @<class>
.新型 class 定义使用单个
classdef
文件来定义所有方法,但仍然可以通过在目录@<class>
中创建 M 文件来覆盖特定 class 或类型的函数。 For example, you can create an M-file @double/foo.m
to create a function foo
that exists only on inputs of type double
.例如,您可以创建一个 M 文件
@double/foo.m
来创建一个仅存在于double
类型的输入上的 function foo
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.