Espaços nominais
Variantes
Acções

std::valarray

Da cppreference.com
< cpp‎ | numeric

 
 
Biblioteca numéricos
Funções matemáticas comuns
De ponto flutuante ambiente
Números complexos
Matrizes numéricas
Pseudo-aleatório de geração de números
Tempo de compilação aritmética racional (C++11)
Genéricos operações numéricas
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
 
std::valarray
 
Definido no cabeçalho <valarray>
template< class T >
class valarray;
std::valarray é a classe para representar e manipular matrizes de valores. Ele suporta elemento sábios operações matemáticas e várias formas de operadores generalizadas subscrito, corte e acesso indirecto.
Original:
std::valarray is the class for representing and manipulating arrays of values. It supports element-wise mathematical operations and various forms of generalized subscript operators, slicing and indirect access.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Notas

Classes std::valarray e auxiliar são definidas para ser livre de certas formas de aliasing, permitindo assim que as operações dessas classes de ser optimizado semelhante ao efeito da palavra-chave restrict na linguagem de programação C. Além disso, funções e operadores que levam argumentos valarray têm permissão para retornar objetos proxy para torná-lo possível para o compilador para otimizar uma expressão como v1 = a*v2 + v3; como um único laço que executa v1[i] = a*v2[i] + v3[i]; evitando temporários ou passes múltiplos. No entanto, modelos de expressão fazer a mesma técnica de optimização disponível para qualquer C + + recipiente, e a maioria das bibliotecas de expressão de modelos numéricos preferem a valarrays de flexibilidade. Algumas implementações de C + + biblioteca padrão usar modelos de expressão para implementar operações eficientes em std::valarray (por exemplo, GNU libstdc + + e libc LLVM + +), e só raramente são otimizados valarrays mais longe, por exemplo, em Intel Parallel Studio.
Original:
std::valarray and helper classes are defined to be free of certain forms of aliasing, thus allowing operations on these classes to be optimized similar to the effect of the keyword restrict in the C programming language. In addition, functions and operators that take valarray arguments are allowed to return proxy objects to make it possible for the compiler to optimize an expression such as v1 = a*v2 + v3; as a single loop that executes v1[i] = a*v2[i] + v3[i]; avoiding any temporaries or multiple passes. However, modelos de expressão make the same optimization technique available for any C++ container, and the majority of numeric libraries prefer expression templates to valarrays for flexibility. Some C++ standard library implementations use expression templates to implement efficient operations on std::valarray (e.g. GNU libstdc++ and LLVM libc++), and only rarely valarrays are optimized any further, e.g. in Intel Parallel Studio.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Tipos de membro

Tipo de membro
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
value_type T

[editar] Funções de membro

constrói nova matriz numérica
Original:
constructs new numeric array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
destrói a matriz numérica
Original:
destructs the numeric array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
atribui o conteúdo
Original:
assigns the contents
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
get / set elemento valarray, uma fatia ou máscara
Original:
get/set valarray element, slice, or mask
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
aplica-se um operador unário aritmética para cada elemento da valarray
Original:
applies a unary arithmetic operator to each element of the valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
aplica-se operador de atribuição composto para cada elemento da valarray
Original:
applies compound assignment operator to each element of the valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
swaps com outro valarray
Original:
swaps with another valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
retorna o tamanho de valarray
Original:
returns the size of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
altera o tamanho do valarray
Original:
changes the size of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
calcula a soma de todos os elementos
Original:
calculates the sum of all elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
retorna o elemento mais pequeno
Original:
returns the smallest element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
retorna o elemento maior
Original:
returns the largest element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
zero-enchimento deslocar os elementos do valarray
Original:
zero-filling shift the elements of the valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
deslocamento circular dos elementos do valarray
Original:
circular shift of the elements of the valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
applies a function to every element of a valarray
(função pública membro) [edit]

[editar] Não-membros funções

o algoritmo especializado std::swap()
Original:
specializes the std::swap() algorithm
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
std::begin especializada
Original:
specializes std::begin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
std::end especializada
Original:
specializes std::end
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se operadores binários para cada elemento de duas valarrays, ou um valarray e um valor
Original:
applies binary operators to each element of two valarrays, or a valarray and a value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
compara dois valarrays ou um valarray com um valor
Original:
compares two valarrays or a valarray with a value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::abs função de cada elemento de valarray
Original:
applies the function std::abs to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
Funções exponenciais
Original:
Exponential functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
aplica-se a std::exp função de cada elemento de valarray
Original:
applies the function std::exp to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::log função de cada elemento de valarray
Original:
applies the function std::log to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::log10 função de cada elemento de valarray
Original:
applies the function std::log10 to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
Funções de poder
Original:
Power functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
aplica-se a função de dois std::pow valarrays ou um valarray e um valor
Original:
applies the function std::pow to two valarrays or a valarray and a value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::sqrt função de cada elemento de valarray
Original:
applies the function std::sqrt to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
Funções trigonométricas
Original:
Trigonometric functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
aplica-se a std::sin função de cada elemento de valarray
Original:
applies the function std::sin to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::cos função de cada elemento de valarray
Original:
applies the function std::cos to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::tan função de cada elemento de valarray
Original:
applies the function std::tan to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::asin função de cada elemento de valarray
Original:
applies the function std::asin to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::acos função de cada elemento de valarray
Original:
applies the function std::acos to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::atan função de cada elemento de valarray
Original:
applies the function std::atan to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a função de um std::atan2 valarray e um valor
Original:
applies the function std::atan2 to a valarray and a value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
Funções hiperbólicas
Original:
Hyperbolic functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
aplica-se a std::sinh função de cada elemento de valarray
Original:
applies the function std::sinh to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::cosh função de cada elemento de valarray
Original:
applies the function std::cosh to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
aplica-se a std::tanh função de cada elemento de valarray
Original:
applies the function std::tanh to each element of valarray
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]

[editar] Classes auxiliares

BLAS-como fatia de um valarray: índice inicial, comprimento da passada
Original:
BLAS-like slice of a valarray: starting index, length, stride
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
proxy para um subconjunto de uma valarray após a aplicação de uma fatia
Original:
proxy to a subset of a valarray after applying a slice
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
fatia generalizada de uma valarray: índice inicial, conjunto de comprimentos, conjunto de passos
Original:
generalized slice of a valarray: starting index, set of lengths, set of strides
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
proxy para um subconjunto de uma valarray após a aplicação de uma GSlice
Original:
proxy to a subset of a valarray after applying a gslice
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
proxy para um subconjunto de uma valarray após a aplicação de um operador booleano máscara []
Original:
proxy to a subset of a valarray after applying a boolean mask operator[]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
proxy para um subconjunto de um valarray após a aplicação indireta operador []
Original:
proxy to a subset of a valarray after applying indirect operator[]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]