| 1 | /* vector/gsl_vector_long.h |
| 2 | * |
| 3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __GSL_VECTOR_LONG_H__ |
| 21 | #define __GSL_VECTOR_LONG_H__cxx . . $ `external/gsl/gsl_vector_long.h:21:9`! |
| 22 | |
| 23 | #include <stdlib.h> |
| 24 | #include "gsl_types.h"cxx . . $ `<file>/external/gsl/gsl_types.h`/ |
| 25 | #include "gsl_errno.h"cxx . . $ `<file>/external/gsl/gsl_errno.h`/ |
| 26 | #include "gsl_check_range.h"cxx . . $ `<file>/external/gsl/gsl_check_range.h`/ |
| 27 | #include "gsl_block_long.h"cxx . . $ `<file>/external/gsl/gsl_block_long.h`/ |
| 28 | |
| 29 | #undef __BEGIN_DECLScxx . . $ `external/gsl/gsl_vector_ulong.h:35:10`! |
| 30 | #undef __END_DECLScxx . . $ `external/gsl/gsl_vector_ulong.h:36:10`! |
| 31 | #ifdef __cplusplus |
| 32 | # define __BEGIN_DECLS extern "C" { |
| 33 | # define __END_DECLS } |
| 34 | #else |
| 35 | # define __BEGIN_DECLScxx . . $ `external/gsl/gsl_vector_long.h:35:10`! /* empty */ |
| 36 | # define __END_DECLScxx . . $ `external/gsl/gsl_vector_long.h:36:10`! /* empty */ |
| 37 | #endif |
| 38 | |
| 39 | __BEGIN_DECLScxx . . $ `external/gsl/gsl_vector_long.h:35:10`! |
| 40 | |
| 41 | typedef structcxx . . $ $anonymous_type_4aae4d8517eb1558_0# |
| 42 | { |
| 43 | size_t sizecxx . . $ $anonymous_type_4aae4d8517eb1558_0#size.; |
| 44 | size_t stridecxx . . $ $anonymous_type_4aae4d8517eb1558_0#stride.; |
| 45 | long *datacxx . . $ $anonymous_type_4aae4d8517eb1558_0#data.; |
| 46 | gsl_block_longcxx . . $ gsl_block_long# *blockcxx . . $ $anonymous_type_4aae4d8517eb1558_0#block.; |
| 47 | int ownercxx . . $ $anonymous_type_4aae4d8517eb1558_0#owner.; |
| 48 | } |
| 49 | gsl_vector_longcxx . . $ gsl_vector_long#; |
| 50 | |
| 51 | typedef structcxx . . $ $anonymous_type_4aae4d8517eb1558_1# |
| 52 | { |
| 53 | gsl_vector_longcxx . . $ gsl_vector_long# vectorcxx . . $ $anonymous_type_4aae4d8517eb1558_1#vector.; |
| 54 | } _gsl_vector_long_viewcxx . . $ _gsl_vector_long_view#; |
| 55 | |
| 56 | typedef _gsl_vector_long_viewcxx . . $ _gsl_vector_long_view# gsl_vector_long_viewcxx . . $ gsl_vector_long_view#; |
| 57 | |
| 58 | typedef structcxx . . $ $anonymous_type_4aae4d8517eb1558_2# |
| 59 | { |
| 60 | gsl_vector_longcxx . . $ gsl_vector_long# vectorcxx . . $ $anonymous_type_4aae4d8517eb1558_2#vector.; |
| 61 | } _gsl_vector_long_const_viewcxx . . $ _gsl_vector_long_const_view#; |
| 62 | |
| 63 | typedef const _gsl_vector_long_const_viewcxx . . $ _gsl_vector_long_const_view# gsl_vector_long_const_viewcxx . . $ gsl_vector_long_const_view#; |
| 64 | |
| 65 | |
| 66 | /* Allocation */ |
| 67 | |
| 68 | gsl_vector_longcxx . . $ gsl_vector_long# *gsl_vector_long_alloccxx . . $ gsl_vector_long_alloc(6c42462d08db546a). (const size_t n); |
| 69 | gsl_vector_longcxx . . $ gsl_vector_long# *gsl_vector_long_calloccxx . . $ gsl_vector_long_calloc(6c42462d08db546a). (const size_t n); |
| 70 | |
| 71 | gsl_vector_longcxx . . $ gsl_vector_long# *gsl_vector_long_alloc_from_blockcxx . . $ gsl_vector_long_alloc_from_block(606ef93c4c8619f1). (gsl_block_longcxx . . $ gsl_block_long# * b, |
| 72 | const size_t offset, |
| 73 | const size_t n, |
| 74 | const size_t stride); |
| 75 | |
| 76 | gsl_vector_longcxx . . $ gsl_vector_long# *gsl_vector_long_alloc_from_vectorcxx . . $ gsl_vector_long_alloc_from_vector(4357cd1bcb49ac0c). (gsl_vector_longcxx . . $ gsl_vector_long# * v, |
| 77 | const size_t offset, |
| 78 | const size_t n, |
| 79 | const size_t stride); |
| 80 | |
| 81 | void gsl_vector_long_freecxx . . $ gsl_vector_long_free(defadda09a5128). (gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 82 | |
| 83 | /* Views */ |
| 84 | |
| 85 | _gsl_vector_long_viewcxx . . $ _gsl_vector_long_view# |
| 86 | gsl_vector_long_view_arraycxx . . $ gsl_vector_long_view_array(bd1e15ff90dd8fe6). (long *v, size_t n); |
| 87 | |
| 88 | _gsl_vector_long_viewcxx . . $ _gsl_vector_long_view# |
| 89 | gsl_vector_long_view_array_with_stridecxx . . $ gsl_vector_long_view_array_with_stride(ec35aea572e9c07a). (long *base, |
| 90 | size_t stride, |
| 91 | size_t n); |
| 92 | |
| 93 | _gsl_vector_long_const_viewcxx . . $ _gsl_vector_long_const_view# |
| 94 | gsl_vector_long_const_view_arraycxx . . $ gsl_vector_long_const_view_array(dbdb29f551a0e627). (const long *v, size_t n); |
| 95 | |
| 96 | _gsl_vector_long_const_viewcxx . . $ _gsl_vector_long_const_view# |
| 97 | gsl_vector_long_const_view_array_with_stridecxx . . $ gsl_vector_long_const_view_array_with_stride(33ec47da5f613e7b). (const long *base, |
| 98 | size_t stride, |
| 99 | size_t n); |
| 100 | |
| 101 | _gsl_vector_long_viewcxx . . $ _gsl_vector_long_view# |
| 102 | gsl_vector_long_subvectorcxx . . $ gsl_vector_long_subvector(baebccab614e74b). (gsl_vector_longcxx . . $ gsl_vector_long# *v, |
| 103 | size_t i, |
| 104 | size_t n); |
| 105 | |
| 106 | _gsl_vector_long_viewcxx . . $ _gsl_vector_long_view# |
| 107 | gsl_vector_long_subvector_with_stridecxx . . $ gsl_vector_long_subvector_with_stride(8ceeb6eea8542147). (gsl_vector_longcxx . . $ gsl_vector_long# *v, |
| 108 | size_t i, |
| 109 | size_t stride, |
| 110 | size_t n); |
| 111 | |
| 112 | _gsl_vector_long_const_viewcxx . . $ _gsl_vector_long_const_view# |
| 113 | gsl_vector_long_const_subvectorcxx . . $ gsl_vector_long_const_subvector(7f67d92cf4cad8ba). (const gsl_vector_longcxx . . $ gsl_vector_long# *v, |
| 114 | size_t i, |
| 115 | size_t n); |
| 116 | |
| 117 | _gsl_vector_long_const_viewcxx . . $ _gsl_vector_long_const_view# |
| 118 | gsl_vector_long_const_subvector_with_stridecxx . . $ gsl_vector_long_const_subvector_with_stride(a63ac8a8a62af921). (const gsl_vector_longcxx . . $ gsl_vector_long# *v, |
| 119 | size_t i, |
| 120 | size_t stride, |
| 121 | size_t n); |
| 122 | |
| 123 | /* Operations */ |
| 124 | |
| 125 | long gsl_vector_long_getcxx . . $ gsl_vector_long_get(98d3406448837651). (const gsl_vector_longcxx . . $ gsl_vector_long# * v, const size_t i); |
| 126 | void gsl_vector_long_setcxx . . $ gsl_vector_long_set(3125218941bfd60f). (gsl_vector_longcxx . . $ gsl_vector_long# * v, const size_t i, long x); |
| 127 | |
| 128 | long *gsl_vector_long_ptrcxx . . $ gsl_vector_long_ptr(4d58a70b19ae3661). (gsl_vector_longcxx . . $ gsl_vector_long# * v, const size_t i); |
| 129 | const long *gsl_vector_long_const_ptrcxx . . $ gsl_vector_long_const_ptr(880e737e2153848b). (const gsl_vector_longcxx . . $ gsl_vector_long# * v, const size_t i); |
| 130 | |
| 131 | void gsl_vector_long_set_zerocxx . . $ gsl_vector_long_set_zero(defadda09a5128). (gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 132 | void gsl_vector_long_set_allcxx . . $ gsl_vector_long_set_all(dfc35568fa53ac6f). (gsl_vector_longcxx . . $ gsl_vector_long# * v, long x); |
| 133 | int gsl_vector_long_set_basiscxx . . $ gsl_vector_long_set_basis(7f9fec1e4460a652). (gsl_vector_longcxx . . $ gsl_vector_long# * v, size_t i); |
| 134 | |
| 135 | int gsl_vector_long_freadcxx . . $ gsl_vector_long_fread(6a5f79abe9667bc0). (FILEcxx . . $ FILE# * stream, gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 136 | int gsl_vector_long_fwritecxx . . $ gsl_vector_long_fwrite(eb69df33b27dbfcf). (FILEcxx . . $ FILE# * stream, const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 137 | int gsl_vector_long_fscanfcxx . . $ gsl_vector_long_fscanf(6a5f79abe9667bc0). (FILEcxx . . $ FILE# * stream, gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 138 | int gsl_vector_long_fprintfcxx . . $ gsl_vector_long_fprintf(4d71611f56a1e87b). (FILEcxx . . $ FILE# * stream, const gsl_vector_longcxx . . $ gsl_vector_long# * v, |
| 139 | const char *format); |
| 140 | |
| 141 | int gsl_vector_long_memcpycxx . . $ gsl_vector_long_memcpy(24f95ab3a56174ed). (gsl_vector_longcxx . . $ gsl_vector_long# * dest, const gsl_vector_longcxx . . $ gsl_vector_long# * src); |
| 142 | |
| 143 | int gsl_vector_long_reversecxx . . $ gsl_vector_long_reverse(95a54c924b63052b). (gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 144 | |
| 145 | int gsl_vector_long_swapcxx . . $ gsl_vector_long_swap(988570e608fbc5ea). (gsl_vector_longcxx . . $ gsl_vector_long# * v, gsl_vector_longcxx . . $ gsl_vector_long# * w); |
| 146 | int gsl_vector_long_swap_elementscxx . . $ gsl_vector_long_swap_elements(a5bdcfcf4cdcb6ed). (gsl_vector_longcxx . . $ gsl_vector_long# * v, const size_t i, const size_t j); |
| 147 | |
| 148 | long gsl_vector_long_maxcxx . . $ gsl_vector_long_max(aa6f5b1616d64e0e). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 149 | long gsl_vector_long_mincxx . . $ gsl_vector_long_min(aa6f5b1616d64e0e). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 150 | void gsl_vector_long_minmaxcxx . . $ gsl_vector_long_minmax(7e91638d5b709a85). (const gsl_vector_longcxx . . $ gsl_vector_long# * v, long * min_out, long * max_out); |
| 151 | |
| 152 | size_t gsl_vector_long_max_indexcxx . . $ gsl_vector_long_max_index(742f252e3e2f8a25). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 153 | size_t gsl_vector_long_min_indexcxx . . $ gsl_vector_long_min_index(742f252e3e2f8a25). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 154 | void gsl_vector_long_minmax_indexcxx . . $ gsl_vector_long_minmax_index(e54bc396dd4faadf). (const gsl_vector_longcxx . . $ gsl_vector_long# * v, size_t * imin, size_t * imax); |
| 155 | |
| 156 | int gsl_vector_long_addcxx . . $ gsl_vector_long_add(24f95ab3a56174ed). (gsl_vector_longcxx . . $ gsl_vector_long# * a, const gsl_vector_longcxx . . $ gsl_vector_long# * b); |
| 157 | int gsl_vector_long_subcxx . . $ gsl_vector_long_sub(24f95ab3a56174ed). (gsl_vector_longcxx . . $ gsl_vector_long# * a, const gsl_vector_longcxx . . $ gsl_vector_long# * b); |
| 158 | int gsl_vector_long_mulcxx . . $ gsl_vector_long_mul(24f95ab3a56174ed). (gsl_vector_longcxx . . $ gsl_vector_long# * a, const gsl_vector_longcxx . . $ gsl_vector_long# * b); |
| 159 | int gsl_vector_long_divcxx . . $ gsl_vector_long_div(24f95ab3a56174ed). (gsl_vector_longcxx . . $ gsl_vector_long# * a, const gsl_vector_longcxx . . $ gsl_vector_long# * b); |
| 160 | int gsl_vector_long_scalecxx . . $ gsl_vector_long_scale(e3a44f405b8e0612). (gsl_vector_longcxx . . $ gsl_vector_long# * a, const double x); |
| 161 | int gsl_vector_long_add_constantcxx . . $ gsl_vector_long_add_constant(e3a44f405b8e0612). (gsl_vector_longcxx . . $ gsl_vector_long# * a, const double x); |
| 162 | |
| 163 | int gsl_vector_long_isnullcxx . . $ gsl_vector_long_isnull(d30ce84a8892dd60). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 164 | int gsl_vector_long_isposcxx . . $ gsl_vector_long_ispos(d30ce84a8892dd60). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 165 | int gsl_vector_long_isnegcxx . . $ gsl_vector_long_isneg(d30ce84a8892dd60). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 166 | int gsl_vector_long_isnonnegcxx . . $ gsl_vector_long_isnonneg(d30ce84a8892dd60). (const gsl_vector_longcxx . . $ gsl_vector_long# * v); |
| 167 | |
| 168 | #ifdef HAVE_INLINE |
| 169 | |
| 170 | extern inline |
| 171 | long |
| 172 | gsl_vector_long_get (const gsl_vector_long * v, const size_t i) |
| 173 | { |
| 174 | #if GSL_RANGE_CHECK |
| 175 | if (i >= v->size) |
| 176 | { |
| 177 | GSL_ERROR_VAL ("index out of range", GSL_EINVAL, 0); |
| 178 | } |
| 179 | #endif |
| 180 | return v->data[i * v->stride]; |
| 181 | } |
| 182 | |
| 183 | extern inline |
| 184 | void |
| 185 | gsl_vector_long_set (gsl_vector_long * v, const size_t i, long x) |
| 186 | { |
| 187 | #if GSL_RANGE_CHECK |
| 188 | if (i >= v->size) |
| 189 | { |
| 190 | GSL_ERROR_VOID ("index out of range", GSL_EINVAL); |
| 191 | } |
| 192 | #endif |
| 193 | v->data[i * v->stride] = x; |
| 194 | } |
| 195 | |
| 196 | extern inline |
| 197 | long * |
| 198 | gsl_vector_long_ptr (gsl_vector_long * v, const size_t i) |
| 199 | { |
| 200 | #if GSL_RANGE_CHECK |
| 201 | if (i >= v->size) |
| 202 | { |
| 203 | GSL_ERROR_NULL ("index out of range", GSL_EINVAL); |
| 204 | } |
| 205 | #endif |
| 206 | return (long *) (v->data + i * v->stride); |
| 207 | } |
| 208 | |
| 209 | extern inline |
| 210 | const long * |
| 211 | gsl_vector_long_const_ptr (const gsl_vector_long * v, const size_t i) |
| 212 | { |
| 213 | #if GSL_RANGE_CHECK |
| 214 | if (i >= v->size) |
| 215 | { |
| 216 | GSL_ERROR_NULL ("index out of range", GSL_EINVAL); |
| 217 | } |
| 218 | #endif |
| 219 | return (const long *) (v->data + i * v->stride); |
| 220 | } |
| 221 | |
| 222 | |
| 223 | #endif /* HAVE_INLINE */ |
| 224 | |
| 225 | __END_DECLScxx . . $ `external/gsl/gsl_vector_long.h:36:10`! |
| 226 | |
| 227 | #endif /* __GSL_VECTOR_LONG_H__ */ |
| 228 | |
| 229 |