The Wayback Machine - https://web.archive.org/web/20180419025408/http://es.cppreference.com:80/w/cpp/numeric/valarray
Espacios de nombres
Variantes
Acciones

std::valarray

De cppreference.com
< cpp‎ | numeric

 
 
Numéricos biblioteca
Funciones matemáticas comunes
Floating-point medio ambiente
Los números complejos
Matrices numéricas
Pseudo-aleatoria de generación de números
En tiempo de compilación aritmética racional (C++11)
Genéricos operaciones 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 en la cabecera <valarray>
template< class T >
class valarray;
std::valarray es la clase para representar y manipular matrices de valores. Es compatible con sabios elemento operaciones matemáticas y diversas formas de generalizadas operadores subíndice, corte en rodajas y el acceso 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.

Contenido

[editar] Notas

Clases std::valarray y auxiliar están definidos para estar libre de ciertas formas de aliasing, permitiendo así que las operaciones de estas clases para ser optimizado similar al efecto de la palabra clave restrict en el lenguaje de programación C. Además, las funciones y operadores que toman argumentos valarray pueden devolver objetos proxy para hacer posible que el compilador para optimizar una expresión como v1 = a*v2 + v3; como un solo bucle que se ejecuta v1[i] = a*v2[i] + v3[i]; evitando temporales o pases múltiples. Sin embargo, plantillas de expresión hacer la misma técnica de optimización disponibles para cualquier contenedor C + +, y la mayoría de las bibliotecas numéricas prefieren plantillas de expresión para valarrays de flexibilidad. Algunas implementaciones de C + + biblioteca estándar utilizar plantillas de expresión para ejecutar operaciones eficientes en std::valarray (por ejemplo GNU libstdc + + y libc LLVM + +), y sólo en raras ocasiones se han optimizado valarrays cualquier ejemplo adicional, en 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, plantillas de expresión 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 miembros

Miembro de tipo
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] Las funciones miembro

construye nueva 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.

(función miembro público) [editar]
destruye la 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.

(función miembro público) [editar]
asigna el contenido
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.

(función miembro público) [editar]
obtener / establecer elemento valarray, sector u 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.

(función miembro público) [editar]
se aplica un operador aritmético unario a cada elemento de la 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.

(función miembro público) [editar]
se aplica el operador de asignación compuestos para cada elemento de la 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.

(función miembro público) [editar]
swaps con otro 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.

(función miembro público) [editar]
devuelve el tamaño 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.

(función miembro público) [editar]
cambia el tamaño de 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.

(función miembro público) [editar]
calcula la suma de todos los 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.

(función miembro público) [editar]
devuelve el elemento más pequeño
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.

(función miembro público) [editar]
devuelve el elemento más grande
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.

(función miembro público) [editar]
cero llenado desplazar los elementos de la 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.

(función miembro público) [editar]
desplazamiento circular de los elementos de la 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.

(función miembro público) [editar]
applies a function to every element of a valarray
(función miembro público) [editar]

[editar] Terceros funciones

el algoritmo se especializa 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.

(plantilla de función) [editar]
se especializa std::begin
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.

(plantilla de función) [editar]
se especializa std::end
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.

(plantilla de función) [editar]
operadores binarios se aplica a cada elemento de dos valarrays, o un valarray y un 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.

(plantilla de función) [editar]
compara dos valarrays o un valarray con un 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.

(plantilla de función) [editar]
se aplica la std::abs función a 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.

(plantilla de función) [editar]
Funciones exponenciales
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.
se aplica la std::exp función a 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.

(plantilla de función) [editar]
se aplica la std::log función a 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.

(plantilla de función) [editar]
se aplica la std::log10 función a 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.

(plantilla de función) [editar]
Funciones de energía
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 la función std::pow a dos o valarrays valarray una y un 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.

(plantilla de función) [editar]
se aplica la std::sqrt función a 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.

(plantilla de función) [editar]
Funciones 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.
se aplica la std::sin función a 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.

(plantilla de función) [editar]
se aplica la std::cos función a 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.

(plantilla de función) [editar]
se aplica la std::tan función a 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.

(plantilla de función) [editar]
se aplica la std::asin función a 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.

(plantilla de función) [editar]
se aplica la std::acos función a 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.

(plantilla de función) [editar]
se aplica la std::atan función a 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.

(plantilla de función) [editar]
se aplica la función std::atan2 a un valarray y un 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.

(plantilla de función) [editar]
Las funciones 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.
se aplica la std::sinh función a 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.

(plantilla de función) [editar]
se aplica la std::cosh función a 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.

(plantilla de función) [editar]
se aplica la std::tanh función a 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.

(plantilla de función) [editar]

[editar] Clases de ayuda

BLAS-como una rebanada de valarray: índice de inicio, duración, ritmo
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.

(clase) [editar]
proxy para un subconjunto de un valarray después de la aplicación de una rebanada
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.

(plantilla de clase) [editar]
rebanada generalizada de un valarray: Índice de partida, establecida de longitudes, un conjunto de pasos
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.

(clase) [editar]
proxy para un subconjunto de un valarray después de aplicar un 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.

(plantilla de clase) [editar]
proxy para un subconjunto de un valarray después de la aplicación de un 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.

(plantilla de clase) [editar]
proxy para un subconjunto de un valarray después de aplicar operador indirecta []
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.

(plantilla de clase) [editar]