Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays.
Public Static Methods | |
| template<class type_t, class allocator_t> | |
| static xtd::collections::object_model::read_only_collection< type_t > | as_read_only (const xtd::array< type_t, 1, allocator_t > &array) |
| Returns a read-only wrapper for the specified array. | |
| template<class type_t, class allocator_t> | |
| static int32 | binary_search (const array< type_t, 1, allocator_t > &array, int32 index, int32 length, const type_t &value) |
| Searches a range of elements in a one-dimensional sorted array for a value, using the xtd::icomparable interface implemented by each element of the array and by the specified value. | |
| template<class type_t, class allocator_t> | |
| static xtd::size | binary_search (const array< type_t, 1, allocator_t > &array, xtd::size index, xtd::size count, const type_t &value, const xtd::collections::generic::icomparer< type_t > &comparer) |
| Searches a range of elements in a one-dimensional sorted array for a value, using the specified xtd::icomparer interface. | |
| template<class type_t, class allocator_t> | |
| static xtd::size | binary_search (const array< type_t, 1, allocator_t > &array, const type_t &value) |
| Searches an entire one-dimensional sorted array for a specific element, using the xtd::icomparable interface implemented by each element of the array and by the specified object. | |
| template<class type_t, class allocator_t> | |
| static xtd::size | binary_search (const array< type_t, 1, allocator_t > &array, const type_t &value, const xtd::collections::generic::icomparer< type_t > &comparer) |
| Searches a range of elements in a one-dimensional sorted array for a value, using the specified xtd::icomparer interface. | |
| template<class type_t, xtd::size rank, class allocator_t> | |
| static void | clear (const array< type_t, rank, allocator_t > &array) |
| Clears the contents of an array. | |
| template<class type_t, xtd::size rank, class allocator_t> | |
| static void | clear (const array< type_t, rank, allocator_t > &array, xtd::size index, xtd::size length) |
| Sets a range of elements in an array to the default value of each element type. | |
| template<class source_type_t, xtd::size source_rank, class source_allocator_t, class destination_type_t, xtd::size destination_rank, class destination_allocator_t> | |
| static void | constrained_copy (const array< source_type_t, source_rank, source_allocator_t > &source_array, const xtd::array< xtd::size > &source_indexes, array< destination_type_t, destination_rank, destination_allocator_t > &destination_array, const xtd::array< xtd::size > &destination_indexes, xtd::size length) |
| Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely. | |
| template<class source_type_t, xtd::size source_rank, class source_allocator_t, class destination_type_t, xtd::size destination_rank, class destination_allocator_t> | |
| static void | constrained_copy (const array< source_type_t, source_rank, source_allocator_t > &source_array, xtd::size source_index, array< destination_type_t, destination_rank, destination_allocator_t > &destination_array, xtd::size destination_index, xtd::size length) |
| Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely. | |
| template<class output_t, class input_t, xtd::size rank, class allocator_t, class converter_t, class destination_allocator_t = xtd::collections::generic::helpers::allocator<output_t>> | |
| static xtd::array< output_t, rank, destination_allocator_t > | convert_all (const xtd::array< input_t, rank, allocator_t > &array, converter_t converter) |
| Converts an array of one type to an array of another type. | |
| template<class source_type_t, xtd::size source_rank, class source_allocator_t, class destination_type_t, xtd::size destination_rank, class destination_allocator_t> | |
| static void | copy (const array< source_type_t, source_rank, source_allocator_t > &source_array, const array< destination_type_t, destination_rank, destination_allocator_t > &destination_array) |
| Copies a range of elements from an xtd::array starting at the first element and pastes them into another xtd::array starting at the first element. The length is specified as an xtd::size. | |
| template<class source_type_t, xtd::size source_rank, class source_allocator_t, class destination_type_t, xtd::size destination_rank, class destination_allocator_t> | |
| static void | copy (const array< source_type_t, source_rank, source_allocator_t > &source_array, const array< destination_type_t, destination_rank, destination_allocator_t > &destination_array, xtd::size length) |
| Copies a range of elements from an xtd::array starting at the first element and pastes them into another xtd::array starting at the first element. The length is specified as an xtd::size. | |
| template<class source_type_t, xtd::size source_rank, class source_allocator_t, class destination_type_t, xtd::size destination_rank, class destination_allocator_t> | |
| static void | copy (const array< source_type_t, source_rank, source_allocator_t > &source_array, const xtd::array< xtd::size > &source_indexes, const array< destination_type_t, destination_rank, destination_allocator_t > &destination_array, const xtd::array< xtd::size > &destination_indexes, xtd::size length) |
| Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. The length and the indexes are specified as 64-bit integers. | |
| template<class source_type_t, xtd::size source_rank, class source_allocator_t, class destination_type_t, xtd::size destination_rank, class destination_allocator_t> | |
| static void | copy (const array< source_type_t, source_rank, source_allocator_t > &source_array, xtd::size source_index, const array< destination_type_t, destination_rank, destination_allocator_t > &destination_array, xtd::size destination_index, xtd::size length) |
| Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. The length and the indexes are specified as 64-bit integers. | |
| template<class type_t, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::array< type_t, 1, allocator_t > | create_instance (xtd::size length) |
| Creates a one-dimensional xtd::array <type_t> of the specified Type and length, with zero-based indexing. | |
| template<class type_t, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::array< type_t, 2, allocator_t > | create_instance (xtd::size length1, xtd::size length2) |
| Creates a two-dimensional xtd::array <type_t> of the specified Type and dimension lengths, with zero-based indexing. | |
| template<typename type_t, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::array< type_t, 3, allocator_t > | create_instance (xtd::size length1, xtd::size length2, xtd::size length3) |
| Creates a three-dimensional xtd::array <type_t> of the specified Type and dimension lengths, with zero-based indexing. | |
| template<class type_t, xtd::size rank, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::array< type_t, rank, allocator_t > | create_instance (const xtd::array< xtd::size > &lengths) |
| Creates a multidimensional xtd::array <type_t> of the specified Type and dimension lengths, with zero-based indexing. The dimension lengths are specified in an array of 32-bit integers. | |
| template<class type_t, xtd::size rank, class allocator_t, class predicate_t> | |
| static bool | exists (const xtd::array< type_t, rank, allocator_t > &array, predicate_t match) |
| Determines whether the xtd::array <type_t> contains elements that match the conditions defined by the specified predicate.. | |
| template<typename type_t, xtd::size rank, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::size | index_of (const xtd::array< type_t, rank, allocator_t > &array, const type_t &value) noexcept |
| Determines the index of a specific item in the array specified. | |
| template<typename type_t, xtd::size rank, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::size | index_of (const xtd::array< type_t, rank, allocator_t > &array, const type_t &value, xtd::size index) |
| Determines the index of a specific item in the array specified. | |
| template<typename type_t, xtd::size rank, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>> | |
| static xtd::size | index_of (const xtd::array< type_t, rank, allocator_t > &array, const type_t &value, xtd::size index, xtd::size count) |
| Determines the index of a specific item in the array specified. | |
| template<class type_t, class allocator_t> | |
| static void | resize (xtd::array< type_t, 1, allocator_t > &array, int32 new_size) |
| Changes the number of elements of a one-dimensional array to the specified new size. | |
| template<class type_t, class allocator_t> | |
| static void | reverse (xtd::array< type_t, 1, allocator_t > &array) |
| Reverses the order of the elements in the entire xtd::basic_array. | |
| template<class type_t, class allocator_t> | |
| static void | reverse (xtd::array< type_t, 1, allocator_t > &array, int32 index, int32 count) |
| Reverses the order of the elements in the specified range. | |
Public Aliases | |
| using | value_type |
| Represents the array value type. | |
| using | allocator_type |
| Represents the array allocator type. | |
| using | base_type |
| Represents the array base type. | |
| using | size_type |
| Represents the array size type (usually xtd::size). | |
| using | difference_type |
| Represents the array difference type (usually xtd::ptrdiff). | |
| using | reference |
| Represents the reference of array value type. | |
| using | const_reference |
| Represents the const reference of array value type. | |
| using | pointer |
| Represents the pointer of array value type. | |
| using | const_pointer |
| Represents the const pointer of array value type. | |
| using | iterator |
| Represents the iterator of array value type. | |
| using | const_iterator |
| Represents the const iterator of array value type. | |
| using | reverse_iterator |
| Represents the reverse iterator of array value type. | |
| using | const_reverse_iterator |
| Represents the const reverse iterator of array value type. | |
Public Constructors | |
| array ()=default | |
| Initializes a new instance of the array class that is empty. | |
| array (const array &array) | |
| Copy constructor with specified array. | |
| array (array &&array)=default | |
| Move constructor with specified array. | |
| array (const array< xtd::size, 1 > &lengths) | |
| Initializes a new instance of the array class with lengths for each rank specified. | |
| array (const array< xtd::size, 1 > &lengths, const type_t &value) | |
| Initializes a new instance of the array class with lengths for each rank specified. | |
Public Properties | |
| xtd::size | rank () const noexcept override |
| Gets the rank (number of dimensions) of the array. | |
Public Methods | |
| xtd::string | to_string () const noexcept override |
| Returns a xtd::string that represents the current object. | |
Public Operators | |
| array & | operator= (const array &)=default |
| Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
| array & | operator= (array &&)=default |
| Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards. | |
Additional Inherited Members | |
| using | value_type |
| Represents the array value type. | |
| using | allocator_type |
| Represents the array allocator type. | |
| using | base_type |
| Represents the array base type. | |
| using | size_type |
| Represents the array size type (usually xtd::size). | |
| using | difference_type |
| Represents the array difference type (usually xtd::ptrdiff). | |
| using | reference |
| Represents the reference of array value type. | |
| using | const_reference |
| Represents the const reference of array value type. | |
| using | pointer |
| Represents the pointer of array value type. | |
| using | const_pointer |
| Represents the const pointer of array value type. | |
| using | iterator |
| Represents the iterator of array value type. | |
| using | const_iterator |
| Represents the const iterator of array value type. | |
| using | reverse_iterator |
| Represents the reverse iterator of array value type. | |
| using | const_reverse_iterator |
| Represents the const reverse iterator of array value type. | |
| size_type | count () const noexcept override |
| Gets the number of elements contained in the xtd::array <type_t>. | |
| virtual pointer | data () noexcept |
| Returns pointer to the underlying array serving as element storage. | |
| virtual const_pointer | data () const noexcept |
| Returns pointer to the underlying array serving as element storage. | |
| bool | is_fixed_size () const noexcept override |
| Gets a value indicating whether the xtd::collections::generic::ilist <type_t> has a fixed size. | |
| bool | is_read_only () const noexcept override |
| Gets a value indicating whether the xtd::collections::generic::icollection <type_t> is read-only. | |
| bool | is_synchronized () const noexcept override |
| Gets a value indicating whether access to the xtd::collections::generic::icollection <type_t> is synchronized (thread safe). | |
| virtual const base_type & | items () const noexcept |
| Returns the underlying base type items. | |
| virtual base_type & | items () noexcept |
| Returns the underlying base type items. | |
| virtual size_type | length () const noexcept |
| Gets a size that represents the total number of elements in all the dimensions of the array. | |
| virtual xtd::int64 | long_length () |
| Gets a 64-bit integer that represents the total number of elements in all the dimensions of the array. | |
| virtual size_type | max_length () const noexcept |
| Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(xtd::array::begin(), xtd::array::end()) for the largest container. | |
| const xtd::object & | sync_root () const noexcept override |
| Gets an object that can be used to synchronize access to the the xtd::collections::generic::icollection <type_t>. | |
| bool | contains (const type_t &value) const noexcept override |
| Determines whether an element is in the array. | |
| void | copy_to (xtd::array< type_t > &array) const |
| void | copy_to (xtd::array< type_t > &array, size_type array_index) const override |
| Copies the elements of the xtd::array <type_t> to an xtd::array, starting at a particular xtd::array index. | |
| void | copy_to (const xtd::array< size_type > &indexes, xtd::array< type_t > &array, size_type array_index) const |
| void | copy_to (const xtd::array< size_type > &indexes, xtd::array< type_t > &array, size_type array_index, size_type count) const |
| void | copy_to (const size_type index, xtd::array< type_t > &array, size_type array_index) const |
| void | copy_to (const size_type index, xtd::array< type_t > &array, size_type array_index, size_type count) const |
| bool | equals (const object &obj) const noexcept override |
| Determines whether the specified object is equal to the current object. | |
| bool | equals (const basic_array &rhs) const noexcept override |
| virtual void | fill (const value_type &value) noexcept |
| Assigns the value to all elements in the container. | |
| xtd::collections::generic::enumerator< value_type > | get_enumerator () const noexcept override |
| constexpr size_type | get_length (size_type dimension) const |
| Gets the total number of elements in all the dimensions of the array. | |
| xtd::array< size_type, 1 > | get_lengths () const |
| Gets an array of the number of elements of all the dimensions of the array. | |
| constexpr xtd::int64 | get_long_length (size_type dimension) const |
| Gets a 64-bit integer that represents the total number of elements in all the dimensions of the array. | |
| constexpr size_type | get_lower_bound (size_type dimension) const |
| Gets the lower bound of the specified dimension in the array. | |
| constexpr size_type | get_upper_bound (size_type dimension) const |
| Gets the upper bound of the specified dimension in the array. | |
| const value_type & | get_value (const xtd::array< size_type > &indexes) const |
| Gets the value at the specified position in the multidimensional array. The indexes are specified as 32-bit integers array. | |
| size_type | index_of (const type_t &value) const noexcept override |
| Determines the index of a specific item in the xtd::array <type_t>. | |
| size_type | index_of (const type_t &value, size_type index) const |
| size_type | index_of (const type_t &value, size_type index, size_type count) const |
| void | resize (size_type new_size, value_type value) |
Resizes the container to contain count elements, does nothing if count == length(). / @param new_size The new size of the container. / @exception xtd::argument_out_of_range_exception xtd::collections::generic::list::capacity is set to a value that is less than xtd::collections::generic::list::count. / @remarks If the current size is greater thancount, the container is reduced to its firstcountelements. / @remarks If the current size is less thancount`, additional default-inserted elements are appended. void resize(size_type new_size) {resize(new_size, value_type {});}. | |
| void | set_value (const type_t &value, const xtd::array< size_type > &indexes) |
| Sets a value to the element at the specified position in the multidimensional array. | |
| basic_array< type_t > & | sort () |
| Sorts the elements in the entire xtd::collections::generic::list <type_t> using the default comparer. | |
| basic_array< type_t > & | sort (comparison_t &&comparison) |
| Sorts the elements in the entire xtd::collections::generic::list <type_t> using the specified xtd::comparison <type_t>. | |
| basic_array< type_t > & | sort (const xtd::collections::generic::icomparer< type_t > &comparer) |
| Sorts the elements in the entire xtd::collections::generic::list <type_t> using the specified comparer. | |
| basic_array< type_t > & | sort (xtd::size index, xtd::size count, const xtd::collections::generic::icomparer< type_t > &comparer) |
| Sorts the elements in a range of elements in xtd::collections::generic::list <type_t> using the specified comparer. | |
| xtd::string | to_string () const noexcept override |
| Returns a xtd::string that represents the current object. | |
| basic_array & | operator= (const basic_array &other) |
| Copy assignment operator. Replaces the contents with a copy of the contents of other. | |
| basic_array & | operator= (basic_array &&other) noexcept=default |
| Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards. | |
| basic_array & | operator= (std::initializer_list< type_t > &items) |
| Replaces the contents with those identified by initializer list ilist. | |
| const_reference | operator[] (size_type index) const override |
| Returns a reference to the element at specified location index. | |
| reference | operator[] (size_type index) override |
| Returns a reference to the element at specified location index. | |
| operator const base_type & () const noexcept | |
| Returns a reference to the underlying base type. | |
| operator base_type & () noexcept | |
| Returns a reference to the underlying base type. | |
| type_t & | operator() (const xtd::array< size_type > &indexes) |
| Gets the value at the specified position in the multidimensional array. The indexes are specified as a 32-bit integer array. | |
| const type_t & | operator() (const xtd::array< size_type > &indexes) const |
| Gets the value at the specified position in the multidimensional array. The indexes are specified as a 32-bit integer array. | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual xtd::size | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. | |
| template<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| virtual bool | equals (const type_t &) const noexcept=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<class object_a_t, class object_b_t> | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal. | |
| template<class object_a_t, class object_b_t> | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance. | |
| abstract_object ()=default | |
| Initializes a new instance of the xtd::abstract_object class. | |
| using xtd::array< type_t, rank_, allocator_t >::value_type |
Represents the array value type.
| using xtd::array< type_t, rank_, allocator_t >::allocator_type |
Represents the array allocator type.
| using xtd::array< type_t, rank_, allocator_t >::base_type |
Represents the array base type.
| using xtd::array< type_t, rank_, allocator_t >::size_type |
Represents the array size type (usually xtd::size).
| using xtd::array< type_t, rank_, allocator_t >::difference_type |
Represents the array difference type (usually xtd::ptrdiff).
| using xtd::array< type_t, rank_, allocator_t >::reference |
Represents the reference of array value type.
| using xtd::array< type_t, rank_, allocator_t >::const_reference |
Represents the const reference of array value type.
| using xtd::array< type_t, rank_, allocator_t >::pointer |
Represents the pointer of array value type.
| using xtd::array< type_t, rank_, allocator_t >::const_pointer |
Represents the const pointer of array value type.
| using xtd::array< type_t, rank_, allocator_t >::iterator |
Represents the iterator of array value type.
| using xtd::array< type_t, rank_, allocator_t >::const_iterator |
Represents the const iterator of array value type.
| using xtd::array< type_t, rank_, allocator_t >::reverse_iterator |
Represents the reverse iterator of array value type.
| using xtd::array< type_t, rank_, allocator_t >::const_reverse_iterator |
Represents the const reverse iterator of array value type.
|
default |
Initializes a new instance of the array class that is empty.
|
inline |
Copy constructor with specified array.
| array | The xtd::array which elements will be inserted from. |
|
default |
Move constructor with specified array.
| array | The xtd::array which elements will be inserted from. |
|
inline |
Initializes a new instance of the array class with lengths for each rank specified.
| lengths | the lengths for each rank. |
|
inline |
Initializes a new instance of the array class with lengths for each rank specified.
| lengths | the lengths for each rank. |
|
inlinestatic |
Returns a read-only wrapper for the specified array.
| array | The one-dimensional, zero-based array to wrap in a read-only xtd::collections::object_model::read_only_collection<type_t> wrapper. |
|
inlinestatic |
Searches a range of elements in a one-dimensional sorted array for a value, using the xtd::icomparable interface implemented by each element of the array and by the specified value.
| array | The sorted one-dimensional array to search. |
| index | The starting index of the range to search. |
| length | The length of the range to search. |
| value | The object to search for. |
| xtd::rank_exception | array is multidimensional. |
| xtd::argument_out_of_range_exception | index is less than the lower bound of array. -or-<bre> length is less than zero. |
| xtd::argument_exception | index and length do not specify a valid range in array. -or-<bre> value is of a type that is not compatible with the elements of array. |
| xtd::invalid_operation_exception | value does not implement the xtd::icomparable interface, and the search encounters an element that does not implement the xtd::icomparable interface. |
|
inlinestatic |
Searches a range of elements in a one-dimensional sorted array for a value, using the specified xtd::icomparer interface.
| array | The sorted one-dimensional array to search. |
| index | The starting index of the range to search. |
| length | The length of the range to search. |
| value | The object to search for. |
| comparer | The xtd::icomparer implementation to use when comparing elements. -or-<bre> null to use the xtd::icomparable implementation of each element. |
| xtd::rank_exception | array is multidimensional. |
| xtd::argument_out_of_range_exception | index is less than the lower bound of array. -or-<bre> length is less than zero. |
| xtd::argument_exception | index and length do not specify a valid range in array. -or-<bre> value is of a type that is not compatible with the elements of array. |
| xtd::invalid_operation_exception | value does not implement the xtd::icomparable interface, and the search encounters an element that does not implement the xtd::icomparable interface. |
|
inlinestatic |
Searches an entire one-dimensional sorted array for a specific element, using the xtd::icomparable interface implemented by each element of the array and by the specified object.
| array | The sorted one-dimensional array to search. |
| value | The object to search for. |
| xtd::rank_exception | array is multidimensional. |
| xtd::argument_exception | value is of a type that is not compatible with the elements of array. |
| xtd::invalid_operation_exception | value does not implement the xtd::icomparable interface, and the search encounters an element that does not implement the xtd::icomparable interface. |
|
inlinestatic |
Searches a range of elements in a one-dimensional sorted array for a value, using the specified xtd::icomparer interface.
| array | The sorted one-dimensional array to search. |
| value | The object to search for. |
| comparer | The xtd::icomparer implementation to use when comparing elements. -or-<bre> null to use the xtd::icomparable implementation of each element. |
| xtd::rank_exception | array is multidimensional. |
| xtd::argument_out_of_range_exception | index is less than the lower bound of array. -or-<bre> length is less than zero. |
| xtd::argument_exception | index and length do not specify a valid range in array. -or-<bre> value is of a type that is not compatible with the elements of array. |
| xtd::invalid_operation_exception | value does not implement the xtd::icomparable interface, and the search encounters an element that does not implement the xtd::icomparable interface. |
|
inlinestatic |
Clears the contents of an array.
| array | The array to clear. |
|
inlinestatic |
Sets a range of elements in an array to the default value of each element type.
| array | The array whose elements need to be cleared. |
| index | The starting index of the range of elements to clear. |
| length | The number of elements to clear. |
| xtd::index_out_of_range_exception | The sum of `index` and `length` is greater than the size of array. |
|
inlinestatic |
Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.
| source_array | The xtd::array that contains the data to copy. |
| source_indexes | An array of xtd::size that represents the index in source_array at which copying begins. |
| destination_array | The xtd::array that receives the data. |
| destination_indexes | An array of xtd::size that represents the index in destination_array at which storing begins. |
| length | An xtd::size that represents the number of elements to copy. |
| xtd::rank_exception | `source_array` and `destination_array` have different ranks. |
| xtd::argument_out_of_range_excpetion | `source_index` is less than the lower bound of the first dimension of `source_array`. -or- `destination_index` is less than the lower bound of the first dimension of `destination_array`. |
| xtd::argument_exception | `length` is greater than the number of elements from `source_index` to the end of `source_array`. -or- `length` is greater than the number of elements from `destination_index` to the end of `destination_array`. |
|
inlinestatic |
Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.
| source_array | The xtd::array that contains the data to copy. |
| source_index | An xtd::size that represents the index in source_array at which copying begins. |
| destination_array | The xtd::array that receives the data. |
| destination_index | An xtd::size that represents the index in destination_array at which storing begins. |
| length | An xtd::size that represents the number of elements to copy. |
| xtd::rank_exception | `source_array` and `destination_array` have different ranks. |
| xtd::argument_out_of_range_excpetion | `source_index` is less than the lower bound of the first dimension of `source_array`. -or- `destination_index` is less than the lower bound of the first dimension of `destination_array`. |
| xtd::argument_exception | `length` is greater than the number of elements from `source_index` to the end of `source_array`. -or- `length` is greater than the number of elements from `destination_index` to the end of `destination_array`. |
|
inlinestatic |
Converts an array of one type to an array of another type.
| array | The zero-based xtd::array <type_t> to convert to a target type. |
| converter | A xtd::converter <output_t, input_t> that converts each element from one type to another type. |
|
inlinestatic |
Copies a range of elements from an xtd::array starting at the first element and pastes them into another xtd::array starting at the first element. The length is specified as an xtd::size.
| source_array | The xtd::array that contains the data to copy. |
| destination_array | The xtd::rray that receives the data. |
| length | An xtd::size that represents the number of elements to copy. |
| xtd::argument_out_of_range_exception | The `length` is greater than `source_array` size.<ber>-or- The `length` is greater than `destination_array` size. |
|
inlinestatic |
Copies a range of elements from an xtd::array starting at the first element and pastes them into another xtd::array starting at the first element. The length is specified as an xtd::size.
| source_array | The xtd::array that contains the data to copy. |
| destination_array | The xtd::rray that receives the data. |
| length | An xtd::size that represents the number of elements to copy. |
| xtd::argument_out_of_range_exception | The `length` is greater than `source_array` size.<ber>-or- The `length` is greater than `destination_array` size. |
|
inlinestatic |
Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. The length and the indexes are specified as 64-bit integers.
| source_array | The xtd::rray that contains the data to copy. |
| source_index | An xtd::size that represents the index in source_array at which copying begins. |
| destination_array | The xtd::array that receives the data. |
| destination_index | An xtd::size that represents the index in destination_array at which storing begins. |
| length | An xtd::size that represents the number of elements to copy. |
| xtd::argument_out_of_range_exception | The sum of the `source_index` and `length` is greater than `source_array` size.<ber>-or- The sum of the `destination_index` and `length` is greater than `destination_array` size. |
|
inlinestatic |
Copies a range of elements from an xtd::array starting at the specified source index and pastes them to another xtd::array starting at the specified destination index. The length and the indexes are specified as 64-bit integers.
| source_array | The xtd::rray that contains the data to copy. |
| source_index | An xtd::size that represents the index in source_array at which copying begins. |
| destination_array | The xtd::array that receives the data. |
| destination_index | An xtd::size that represents the index in destination_array at which storing begins. |
| length | An xtd::size that represents the number of elements to copy. |
| xtd::argument_out_of_range_exception | The sum of the `source_index` and `length` is greater than `source_array` size.<ber>-or- The sum of the `destination_index` and `length` is greater than `destination_array` size. |
|
inlinestatic |
Creates a one-dimensional xtd::array <type_t> of the specified Type and length, with zero-based indexing.
| length | The size of the xtd::array <type_t> to create. |
| xtd::argument_exception | elementType is not a valid Type. |
| xtd::not_supported_exception | elementType is not supported. For example, Void is not supported. -or- elementType is an open generic type. |
| xtd::argument_out_of_range_exception | length is less than zero. |
| EXamples | The following code example shows how to create and initialize a one-dimensional xtd::array <type_t>. |
|
inlinestatic |
Creates a two-dimensional xtd::array <type_t> of the specified Type and dimension lengths, with zero-based indexing.
| length1 | The size of the first dimension of the xtd::array <type_t> to create. |
| length2 | The size of the second dimension of the xtd::array <type_t> to create. |
| xtd::argument_exception | elementType is not a valid Type. |
| xtd::not_supported_exception | elementType is not supported. For example, Void is not supported. -or- elementType is an open generic type. |
| xtd::argument_out_of_range_exception | length1 is less than zero. -or- xtd::argument_out_of_range_exception length2 is less than zero. |
| EXamples | The following code example shows how to create and initialize a two-dimensional xtd::array <type_t>. |
|
inlinestatic |
Creates a three-dimensional xtd::array <type_t> of the specified Type and dimension lengths, with zero-based indexing.
| length1 | The size of the first dimension of the xtd::array <type_t> to create. |
| length2 | The size of the second dimension of the xtd::array <type_t> to create. |
| length3 | The size of the third dimension of the xtd::array <type_t> to create. |
| xtd::argument_exception | elementType is not a valid Type. |
| xtd::not_supported_exception | elementType is not supported. For example, Void is not supported. -or- elementType is an open generic type. |
| xtd::argument_out_of_range_exception | length1 is less than zero. -or- xtd::argument_out_of_range_exception length2 is less than zero. -or- xtd::argument_out_of_range_exception length3 is less than zero. |
| EXamples | The following code example shows how to create and initialize a three-dimensional xtd::array <type_t>. |
|
inlinestatic |
Creates a multidimensional xtd::array <type_t> of the specified Type and dimension lengths, with zero-based indexing. The dimension lengths are specified in an array of 32-bit integers.
| An | array of 32-bit integers that represent the size of each dimension of the xtd::array <type_t> to create. |
| xtd::argument_exception | elementType is not a valid Type. |
| xtd::not_supported_exception | elementType is not supported. For example, Void is not supported. -or- elementType is an open generic type. |
| xtd::argument_out_of_range_exception | length1 is less than zero. -or- xtd::argument_out_of_range_exception length2 is less than zero. -or- xtd::argument_out_of_range_exception length3 is less than zero. |
|
inlinestatic |
Determines whether the xtd::array <type_t> contains elements that match the conditions defined by the specified predicate..
| match | The xtd::predicate function that defines the conditions of the elements to search for. |
true if the xtd::array <type_t> contains one or more elements that match the conditions defined by the specified predicate; otherwise, false. true if the object passed to it matches the conditions defined in the pointer function. The elements of the current xtd::array <type_t> are individually passed to the Predicate pointer function, and processing is stopped when a match is found.
|
inlinestaticnoexcept |
Determines the index of a specific item in the array specified.
| array | The object to locate in the array. |
| value | The object to locate in the array. |
|
inlinestatic |
Determines the index of a specific item in the array specified.
| array | The object to locate in the array. |
| value | The object to locate in the array. |
| index | The zero-based starting index of the search. |
| xtd::argument_out_of_range_exception | The parameters `index` is less than 0. |
|
inlinestatic |
Determines the index of a specific item in the array specified.
| array | The object to locate in the array. |
| value | The object to locate in the array. |
| index | The zero-based starting index of the search. |
| count | The number of elements in the section to search |
| xtd::argument_out_of_range_exception | The parameters `index` and `count` do not specify a valid section in the 'array'. |
|
inlinestatic |
Changes the number of elements of a one-dimensional array to the specified new size.
| array | The one-dimensional, zero-based array to resize, or null to create a new array with the specified size. |
| newSize | The size of the new array. |
| xtd::argument_out_of_range_exception | newSize is less than zero. |
|
inlinestatic |
Reverses the order of the elements in the entire xtd::basic_array.
i is any index within the range, moves to xtd::basic_array <type_t>[j], where j equals index plus index plus count minus i minus 1.
|
inlinestatic |
Reverses the order of the elements in the specified range.
| index | The zero-based starting index of the range to reverse. |
| count | The number of elements in the range to reverse. |
| xtd::argument_out_of_range_exception | `index` and `count` do not denote a valid range of elements in the xtd::basic_array. |
i is any index within the range, moves to xtd::basic_array <type_t>[j], where j equals index plus index plus count minus i minus 1. count.
|
inlineoverridevirtualnoexcept |
Gets the rank (number of dimensions) of the array.
Reimplemented from xtd::basic_array< type_t, allocator_t >.
|
overridevirtualnoexcept |
Returns a xtd::string that represents the current object.
Reimplemented from xtd::object.
|
default |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
| other | Another container to use as data source. |
|
default |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
| other | Another base type container to use as data source. |