std::sin<div class="t-tr-text">(性病:: valarray的)<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">原文:</div><div class="t-tr-dropdown-orig">(std::valarray)</div><div class="t-tr-dropdown-notes">这段文字是通过 [http://translate.google.com Google Translate] 自动翻译生成的。<br/>您可以帮助我们检查、纠正翻译中的错误。详情请点击[http://en.cppreference.com/w/Cppreference:MachineTranslations 这里]。</div></div></div></div></div>

来自cppreference.com
< cpp‎ | numeric‎ | valarray

 
 
Numerics的图书馆
常见的数学函数
浮点环境
复数
数字阵列
伪随机数生成
编译时合理的算法 (C++11)
通用的数值运算
原文:
Generic numeric operations
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
 
在头文件 <valarray> 中定义
template< class T >
valarray<T> sin( const valarray<T>& va );
对于va计算正弦值的元素的值中的每个元素.
原文:
For each element in va computes sine of the value of the element.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

目录

[编辑] 参数

va -
值的数组的操作
原文:
value array to apply the operation to
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 返回值

值数组中的值包含正弦va.
原文:
Value array containing sine of the values in va.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 注释

碎末功能(sin)是用来执行计算。如果这种功能是不可用的,std::sin由于参数依赖查找.
原文:
Unqualified function (sin) is used to perform the computation. If such function is not available, std::sin is used due to argument dependent lookup.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
该功能可以实现从std::valarray不同的返回类型。在这种情况下,替换类型具有以下属性:
原文:
The function can be implemented with the return type different from std::valarray. In this case, the replacement type has the following properties:
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
  • const提供的所有std::valarray成员函数.
    原文:
    All const member functions of std::valarray are provided.
    这段文字是通过 Google Translate 自动翻译生成的。
    您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
  • std::valarraystd::slice_arraystd::gslice_arraystd::mask_arraystd::indirect_array可以由更换型.
    原文:
    std::valarray, std::slice_array, std::gslice_array, std::mask_array and std::indirect_array can be constructed from the replacement type.
    这段文字是通过 Google Translate 自动翻译生成的。
    您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
  • 所有的函数接受一个参数的类型const std::valarray&也应接受替换类型.
    原文:
    All functions accepting a arguments of type const std::valarray& should also accept the replacement type.
    这段文字是通过 Google Translate 自动翻译生成的。
    您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
  • 接受两个参数的类型const std::valarray&应该接受所有的功能const std::valarray&的每个组合和置换型.
    原文:
    All functions accepting two arguments of type const std::valarray& should accept every combination of const std::valarray& and the replacement type.
    这段文字是通过 Google Translate 自动翻译生成的。
    您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 可能的实现

template<class T>
valarray<T> sin(const valarray<T>& va)
{
    valarray<T> other = va;
    for (T &i : other) {
        i = sin(i);
    }
}

[编辑] 示例