diff --git a/cmf/cmf_core_src/cmf_wrap.cpp b/cmf/cmf_core_src/cmf_wrap.cpp index 26bd274c..fea8d191 100644 --- a/cmf/cmf_core_src/cmf_wrap.cpp +++ b/cmf/cmf_core_src/cmf_wrap.cpp @@ -3009,203 +3009,216 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_char swig_types[0] -#define SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology swig_types[1] -#define SWIGTYPE_p_cmf__atmosphere__ConstantRainSource swig_types[2] -#define SWIGTYPE_p_cmf__atmosphere__IDWRainfall swig_types[3] -#define SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology swig_types[4] -#define SWIGTYPE_p_cmf__atmosphere__MeteoStation swig_types[5] -#define SWIGTYPE_p_cmf__atmosphere__MeteoStationList swig_types[6] -#define SWIGTYPE_p_cmf__atmosphere__MeteoStationReference swig_types[7] -#define SWIGTYPE_p_cmf__atmosphere__Meteorology swig_types[8] -#define SWIGTYPE_p_cmf__atmosphere__RainSource swig_types[9] -#define SWIGTYPE_p_cmf__atmosphere__RainfallStation swig_types[10] -#define SWIGTYPE_p_cmf__atmosphere__RainfallStationList swig_types[11] -#define SWIGTYPE_p_cmf__atmosphere__RainfallStationReference swig_types[12] -#define SWIGTYPE_p_cmf__atmosphere__TimeseriesRainSource swig_types[13] -#define SWIGTYPE_p_cmf__atmosphere__Weather swig_types[14] -#define SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance swig_types[15] -#define SWIGTYPE_p_cmf__atmosphere__log_wind_profile swig_types[16] -#define SWIGTYPE_p_cmf__geometry__point swig_types[17] -#define SWIGTYPE_p_cmf__geometry__point_vector swig_types[18] -#define SWIGTYPE_p_cmf__math__BDF2 swig_types[19] -#define SWIGTYPE_p_cmf__math__CVodeIntegrator swig_types[20] -#define SWIGTYPE_p_cmf__math__Date swig_types[21] -#define SWIGTYPE_p_cmf__math__ExplicitEuler_fixed swig_types[22] -#define SWIGTYPE_p_cmf__math__HeunIntegrator swig_types[23] -#define SWIGTYPE_p_cmf__math__ImplicitEuler swig_types[24] -#define SWIGTYPE_p_cmf__math__Integrator swig_types[25] -#define SWIGTYPE_p_cmf__math__MultiIntegrator swig_types[26] -#define SWIGTYPE_p_cmf__math__RKFIntegrator swig_types[27] -#define SWIGTYPE_p_cmf__math__SoluteWaterIntegrator swig_types[28] -#define SWIGTYPE_p_cmf__math__StateVariable swig_types[29] -#define SWIGTYPE_p_cmf__math__StateVariableList swig_types[30] -#define SWIGTYPE_p_cmf__math__StateVariableOwner swig_types[31] -#define SWIGTYPE_p_cmf__math__Time swig_types[32] -#define SWIGTYPE_p_cmf__math__cubicspline swig_types[33] -#define SWIGTYPE_p_cmf__math__integratable swig_types[34] -#define SWIGTYPE_p_cmf__math__integratable_list swig_types[35] -#define SWIGTYPE_p_cmf__math__num_array swig_types[36] -#define SWIGTYPE_p_cmf__math__timeseries swig_types[37] -#define SWIGTYPE_p_cmf__project swig_types[38] -#define SWIGTYPE_p_cmf__river__Channel swig_types[39] -#define SWIGTYPE_p_cmf__river__CrossSectionReach swig_types[40] -#define SWIGTYPE_p_cmf__river__IChannel swig_types[41] -#define SWIGTYPE_p_cmf__river__IVolumeHeightFunction swig_types[42] -#define SWIGTYPE_p_cmf__river__Manning swig_types[43] -#define SWIGTYPE_p_cmf__river__Manning_Diffusive swig_types[44] -#define SWIGTYPE_p_cmf__river__Manning_Kinematic swig_types[45] -#define SWIGTYPE_p_cmf__river__MeanChannel swig_types[46] -#define SWIGTYPE_p_cmf__river__OpenWaterStorage swig_types[47] -#define SWIGTYPE_p_cmf__river__PipeReach swig_types[48] -#define SWIGTYPE_p_cmf__river__Prism swig_types[49] -#define SWIGTYPE_p_cmf__river__Reach swig_types[50] -#define SWIGTYPE_p_cmf__river__ReachIterator swig_types[51] -#define SWIGTYPE_p_cmf__river__RectangularReach swig_types[52] -#define SWIGTYPE_p_cmf__river__SWATReachType swig_types[53] -#define SWIGTYPE_p_cmf__river__TriangularReach swig_types[54] -#define SWIGTYPE_p_cmf__river__volume_height_function swig_types[55] -#define SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve swig_types[56] -#define SWIGTYPE_p_cmf__upslope__Cell swig_types[57] -#define SWIGTYPE_p_cmf__upslope__CellConnector swig_types[58] -#define SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation swig_types[59] -#define SWIGTYPE_p_cmf__upslope__ET__ContentStress swig_types[60] -#define SWIGTYPE_p_cmf__upslope__ET__HargreaveET swig_types[61] -#define SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation swig_types[62] -#define SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET swig_types[63] -#define SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET swig_types[64] -#define SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction swig_types[65] -#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_canopy swig_types[66] -#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_layer swig_types[67] -#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_snow swig_types[68] -#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_surfacewater swig_types[69] -#define SWIGTYPE_p_cmf__upslope__ET__SW_transpiration swig_types[70] -#define SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace swig_types[71] -#define SWIGTYPE_p_cmf__upslope__ET__SuctionStress swig_types[72] -#define SWIGTYPE_p_cmf__upslope__ET__TurcET swig_types[73] -#define SWIGTYPE_p_cmf__upslope__ET__VolumeStress swig_types[74] -#define SWIGTYPE_p_cmf__upslope__ET__constantETpot swig_types[75] -#define SWIGTYPE_p_cmf__upslope__ET__stressedET swig_types[76] -#define SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot swig_types[77] -#define SWIGTYPE_p_cmf__upslope__LinearRetention swig_types[78] -#define SWIGTYPE_p_cmf__upslope__MacroPore swig_types[79] -#define SWIGTYPE_p_cmf__upslope__RetentionCurve swig_types[80] -#define SWIGTYPE_p_cmf__upslope__SoilLayer swig_types[81] -#define SWIGTYPE_p_cmf__upslope__SurfaceWater swig_types[82] -#define SWIGTYPE_p_cmf__upslope__Topology swig_types[83] -#define SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem swig_types[84] -#define SWIGTYPE_p_cmf__upslope__aquifer swig_types[85] -#define SWIGTYPE_p_cmf__upslope__aquifer_Darcy swig_types[86] -#define SWIGTYPE_p_cmf__upslope__cell_vector swig_types[87] -#define SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow swig_types[88] -#define SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow swig_types[89] -#define SWIGTYPE_p_cmf__upslope__connections__Darcy swig_types[90] -#define SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic swig_types[91] -#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange swig_types[92] -#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff swig_types[93] -#define SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt swig_types[94] -#define SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation swig_types[95] -#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow swig_types[96] -#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange swig_types[97] -#define SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration swig_types[98] -#define SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow swig_types[99] -#define SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow swig_types[100] -#define SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff swig_types[101] -#define SWIGTYPE_p_cmf__upslope__connections__LayerBypass swig_types[102] -#define SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange swig_types[103] -#define SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration swig_types[104] -#define SWIGTYPE_p_cmf__upslope__connections__Rainfall swig_types[105] -#define SWIGTYPE_p_cmf__upslope__connections__Richards swig_types[106] -#define SWIGTYPE_p_cmf__upslope__connections__Richards_lateral swig_types[107] -#define SWIGTYPE_p_cmf__upslope__connections__RutterInterception swig_types[108] -#define SWIGTYPE_p_cmf__upslope__connections__SWATPercolation swig_types[109] -#define SWIGTYPE_p_cmf__upslope__connections__SimplRichards swig_types[110] -#define SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration swig_types[111] -#define SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt swig_types[112] -#define SWIGTYPE_p_cmf__upslope__connections__Snowfall swig_types[113] -#define SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow swig_types[114] -#define SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy swig_types[115] -#define SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux swig_types[116] -#define SWIGTYPE_p_cmf__upslope__layer_list swig_types[117] -#define SWIGTYPE_p_cmf__upslope__neighbor_iterator swig_types[118] -#define SWIGTYPE_p_cmf__upslope__subcatchment swig_types[119] -#define SWIGTYPE_p_cmf__upslope__vegetation__Vegetation swig_types[120] -#define SWIGTYPE_p_cmf__water__Adsorption swig_types[121] -#define SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection swig_types[122] -#define SWIGTYPE_p_cmf__water__DirichletBoundary swig_types[123] -#define SWIGTYPE_p_cmf__water__ExponentialDeclineConnection swig_types[124] -#define SWIGTYPE_p_cmf__water__FreundlichAdsorbtion swig_types[125] -#define SWIGTYPE_p_cmf__water__LangmuirAdsorption swig_types[126] -#define SWIGTYPE_p_cmf__water__LinearAdsorption swig_types[127] -#define SWIGTYPE_p_cmf__water__LinearStorageConnection swig_types[128] -#define SWIGTYPE_p_cmf__water__NeumannBoundary swig_types[129] -#define SWIGTYPE_p_cmf__water__NeumannBoundary_list swig_types[130] -#define SWIGTYPE_p_cmf__water__NeumannFlux swig_types[131] -#define SWIGTYPE_p_cmf__water__NullAdsorption swig_types[132] -#define SWIGTYPE_p_cmf__water__PowerLawConnection swig_types[133] -#define SWIGTYPE_p_cmf__water__SoluteStorage swig_types[134] -#define SWIGTYPE_p_cmf__water__SoluteTimeseries swig_types[135] -#define SWIGTYPE_p_cmf__water__SystemBridge swig_types[136] -#define SWIGTYPE_p_cmf__water__SystemBridgeConnection swig_types[137] -#define SWIGTYPE_p_cmf__water__TechnicalFlux swig_types[138] -#define SWIGTYPE_p_cmf__water__WaterStorage swig_types[139] -#define SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange swig_types[140] -#define SWIGTYPE_p_cmf__water__connection_list swig_types[141] -#define SWIGTYPE_p_cmf__water__constraint_kinematic_wave swig_types[142] -#define SWIGTYPE_p_cmf__water__external_control_connection swig_types[143] -#define SWIGTYPE_p_cmf__water__flux_connection swig_types[144] -#define SWIGTYPE_p_cmf__water__flux_integrator swig_types[145] -#define SWIGTYPE_p_cmf__water__flux_node swig_types[146] -#define SWIGTYPE_p_cmf__water__generic_gradient_connection swig_types[147] -#define SWIGTYPE_p_cmf__water__kinematic_wave swig_types[148] -#define SWIGTYPE_p_cmf__water__linear_scale swig_types[149] -#define SWIGTYPE_p_cmf__water__node_list swig_types[150] -#define SWIGTYPE_p_cmf__water__solute swig_types[151] -#define SWIGTYPE_p_cmf__water__solute_vector swig_types[152] -#define SWIGTYPE_p_cmf__water__statecontrol_connection swig_types[153] -#define SWIGTYPE_p_cmf__water__waterbalance_connection swig_types[154] -#define SWIGTYPE_p_cmf__water__waterbalance_integrator swig_types[155] -#define SWIGTYPE_p_const_iterator swig_types[156] -#define SWIGTYPE_p_double swig_types[157] -#define SWIGTYPE_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void swig_types[158] -#define SWIGTYPE_p_iterator swig_types[159] -#define SWIGTYPE_p_ptr swig_types[160] -#define SWIGTYPE_p_std__shared_ptrT_SoilLayer_t swig_types[161] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t swig_types[162] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t swig_types[163] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t swig_types[164] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t swig_types[165] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t swig_types[166] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t swig_types[167] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t swig_types[168] -#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t swig_types[169] -#define SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t swig_types[170] -#define SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t swig_types[171] -#define SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t swig_types[172] -#define SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t swig_types[173] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__ShuttleworthWallace_t swig_types[174] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__aerodynamic_resistance_t swig_types[175] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t swig_types[176] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t swig_types[177] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t swig_types[178] -#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t swig_types[179] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t swig_types[180] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t swig_types[181] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t swig_types[182] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t swig_types[183] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t swig_types[184] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t swig_types[185] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t swig_types[186] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t swig_types[187] -#define SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t swig_types[188] -#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t swig_types[189] -#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t swig_types[190] -#define SWIGTYPE_p_std__string swig_types[191] -#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t swig_types[192] -#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator swig_types[193] -#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator swig_types[194] -static swig_type_info *swig_types[196]; -static swig_module_info swig_module = {swig_types, 195, 0, 0, 0, 0}; +#define SWIGTYPE_p_allocator_type swig_types[0] +#define SWIGTYPE_p_char swig_types[1] +#define SWIGTYPE_p_cmf__atmosphere__ConstantMeteorology swig_types[2] +#define SWIGTYPE_p_cmf__atmosphere__ConstantRainSource swig_types[3] +#define SWIGTYPE_p_cmf__atmosphere__IDWRainfall swig_types[4] +#define SWIGTYPE_p_cmf__atmosphere__IDW_Meteorology swig_types[5] +#define SWIGTYPE_p_cmf__atmosphere__MeteoStation swig_types[6] +#define SWIGTYPE_p_cmf__atmosphere__MeteoStationList swig_types[7] +#define SWIGTYPE_p_cmf__atmosphere__MeteoStationReference swig_types[8] +#define SWIGTYPE_p_cmf__atmosphere__Meteorology swig_types[9] +#define SWIGTYPE_p_cmf__atmosphere__RainSource swig_types[10] +#define SWIGTYPE_p_cmf__atmosphere__RainfallStation swig_types[11] +#define SWIGTYPE_p_cmf__atmosphere__RainfallStationList swig_types[12] +#define SWIGTYPE_p_cmf__atmosphere__RainfallStationReference swig_types[13] +#define SWIGTYPE_p_cmf__atmosphere__TimeseriesRainSource swig_types[14] +#define SWIGTYPE_p_cmf__atmosphere__Weather swig_types[15] +#define SWIGTYPE_p_cmf__atmosphere__aerodynamic_resistance swig_types[16] +#define SWIGTYPE_p_cmf__atmosphere__log_wind_profile swig_types[17] +#define SWIGTYPE_p_cmf__geometry__point swig_types[18] +#define SWIGTYPE_p_cmf__geometry__point_vector swig_types[19] +#define SWIGTYPE_p_cmf__math__BDF2 swig_types[20] +#define SWIGTYPE_p_cmf__math__CVodeIntegrator swig_types[21] +#define SWIGTYPE_p_cmf__math__Date swig_types[22] +#define SWIGTYPE_p_cmf__math__ExplicitEuler_fixed swig_types[23] +#define SWIGTYPE_p_cmf__math__HeunIntegrator swig_types[24] +#define SWIGTYPE_p_cmf__math__ImplicitEuler swig_types[25] +#define SWIGTYPE_p_cmf__math__Integrator swig_types[26] +#define SWIGTYPE_p_cmf__math__MultiIntegrator swig_types[27] +#define SWIGTYPE_p_cmf__math__RKFIntegrator swig_types[28] +#define SWIGTYPE_p_cmf__math__SoluteWaterIntegrator swig_types[29] +#define SWIGTYPE_p_cmf__math__StateVariable swig_types[30] +#define SWIGTYPE_p_cmf__math__StateVariableList swig_types[31] +#define SWIGTYPE_p_cmf__math__StateVariableOwner swig_types[32] +#define SWIGTYPE_p_cmf__math__Time swig_types[33] +#define SWIGTYPE_p_cmf__math__cubicspline swig_types[34] +#define SWIGTYPE_p_cmf__math__integratable swig_types[35] +#define SWIGTYPE_p_cmf__math__integratable_list swig_types[36] +#define SWIGTYPE_p_cmf__math__num_array swig_types[37] +#define SWIGTYPE_p_cmf__math__timeseries swig_types[38] +#define SWIGTYPE_p_cmf__project swig_types[39] +#define SWIGTYPE_p_cmf__river__Channel swig_types[40] +#define SWIGTYPE_p_cmf__river__CrossSectionReach swig_types[41] +#define SWIGTYPE_p_cmf__river__IChannel swig_types[42] +#define SWIGTYPE_p_cmf__river__IVolumeHeightFunction swig_types[43] +#define SWIGTYPE_p_cmf__river__Manning swig_types[44] +#define SWIGTYPE_p_cmf__river__Manning_Diffusive swig_types[45] +#define SWIGTYPE_p_cmf__river__Manning_Kinematic swig_types[46] +#define SWIGTYPE_p_cmf__river__MeanChannel swig_types[47] +#define SWIGTYPE_p_cmf__river__OpenWaterStorage swig_types[48] +#define SWIGTYPE_p_cmf__river__PipeReach swig_types[49] +#define SWIGTYPE_p_cmf__river__Prism swig_types[50] +#define SWIGTYPE_p_cmf__river__Reach swig_types[51] +#define SWIGTYPE_p_cmf__river__ReachIterator swig_types[52] +#define SWIGTYPE_p_cmf__river__RectangularReach swig_types[53] +#define SWIGTYPE_p_cmf__river__SWATReachType swig_types[54] +#define SWIGTYPE_p_cmf__river__TriangularReach swig_types[55] +#define SWIGTYPE_p_cmf__river__volume_height_function swig_types[56] +#define SWIGTYPE_p_cmf__upslope__BrooksCoreyRetentionCurve swig_types[57] +#define SWIGTYPE_p_cmf__upslope__Cell swig_types[58] +#define SWIGTYPE_p_cmf__upslope__CellConnector swig_types[59] +#define SWIGTYPE_p_cmf__upslope__ET__CanopyStorageEvaporation swig_types[60] +#define SWIGTYPE_p_cmf__upslope__ET__ContentStress swig_types[61] +#define SWIGTYPE_p_cmf__upslope__ET__HargreaveET swig_types[62] +#define SWIGTYPE_p_cmf__upslope__ET__PenmanEvaporation swig_types[63] +#define SWIGTYPE_p_cmf__upslope__ET__PenmanMonteithET swig_types[64] +#define SWIGTYPE_p_cmf__upslope__ET__PriestleyTaylorET swig_types[65] +#define SWIGTYPE_p_cmf__upslope__ET__RootUptakeStessFunction swig_types[66] +#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_canopy swig_types[67] +#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_layer swig_types[68] +#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_snow swig_types[69] +#define SWIGTYPE_p_cmf__upslope__ET__SW_evap_from_surfacewater swig_types[70] +#define SWIGTYPE_p_cmf__upslope__ET__SW_transpiration swig_types[71] +#define SWIGTYPE_p_cmf__upslope__ET__ShuttleworthWallace swig_types[72] +#define SWIGTYPE_p_cmf__upslope__ET__SuctionStress swig_types[73] +#define SWIGTYPE_p_cmf__upslope__ET__TurcET swig_types[74] +#define SWIGTYPE_p_cmf__upslope__ET__VolumeStress swig_types[75] +#define SWIGTYPE_p_cmf__upslope__ET__constantETpot swig_types[76] +#define SWIGTYPE_p_cmf__upslope__ET__stressedET swig_types[77] +#define SWIGTYPE_p_cmf__upslope__ET__timeseriesETpot swig_types[78] +#define SWIGTYPE_p_cmf__upslope__LinearRetention swig_types[79] +#define SWIGTYPE_p_cmf__upslope__MacroPore swig_types[80] +#define SWIGTYPE_p_cmf__upslope__RetentionCurve swig_types[81] +#define SWIGTYPE_p_cmf__upslope__SoilLayer swig_types[82] +#define SWIGTYPE_p_cmf__upslope__SurfaceWater swig_types[83] +#define SWIGTYPE_p_cmf__upslope__Topology swig_types[84] +#define SWIGTYPE_p_cmf__upslope__VanGenuchtenMualem swig_types[85] +#define SWIGTYPE_p_cmf__upslope__aquifer swig_types[86] +#define SWIGTYPE_p_cmf__upslope__aquifer_Darcy swig_types[87] +#define SWIGTYPE_p_cmf__upslope__cell_vector swig_types[88] +#define SWIGTYPE_p_cmf__upslope__connections__BaseMacroFlow swig_types[89] +#define SWIGTYPE_p_cmf__upslope__connections__CanopyOverflow swig_types[90] +#define SWIGTYPE_p_cmf__upslope__connections__Darcy swig_types[91] +#define SWIGTYPE_p_cmf__upslope__connections__DarcyKinematic swig_types[92] +#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveMacroMicroExchange swig_types[93] +#define SWIGTYPE_p_cmf__upslope__connections__DiffusiveSurfaceRunoff swig_types[94] +#define SWIGTYPE_p_cmf__upslope__connections__EnergyBudgetSnowMelt swig_types[95] +#define SWIGTYPE_p_cmf__upslope__connections__FreeDrainagePercolation swig_types[96] +#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroFlow swig_types[97] +#define SWIGTYPE_p_cmf__upslope__connections__GradientMacroMicroExchange swig_types[98] +#define SWIGTYPE_p_cmf__upslope__connections__GreenAmptInfiltration swig_types[99] +#define SWIGTYPE_p_cmf__upslope__connections__JarvisMacroFlow swig_types[100] +#define SWIGTYPE_p_cmf__upslope__connections__KinematicMacroFlow swig_types[101] +#define SWIGTYPE_p_cmf__upslope__connections__KinematicSurfaceRunoff swig_types[102] +#define SWIGTYPE_p_cmf__upslope__connections__LayerBypass swig_types[103] +#define SWIGTYPE_p_cmf__upslope__connections__MACROlikeMacroMicroExchange swig_types[104] +#define SWIGTYPE_p_cmf__upslope__connections__MatrixInfiltration swig_types[105] +#define SWIGTYPE_p_cmf__upslope__connections__Rainfall swig_types[106] +#define SWIGTYPE_p_cmf__upslope__connections__Richards swig_types[107] +#define SWIGTYPE_p_cmf__upslope__connections__Richards_lateral swig_types[108] +#define SWIGTYPE_p_cmf__upslope__connections__RutterInterception swig_types[109] +#define SWIGTYPE_p_cmf__upslope__connections__SWATPercolation swig_types[110] +#define SWIGTYPE_p_cmf__upslope__connections__SimplRichards swig_types[111] +#define SWIGTYPE_p_cmf__upslope__connections__SimpleInfiltration swig_types[112] +#define SWIGTYPE_p_cmf__upslope__connections__SimpleTindexSnowMelt swig_types[113] +#define SWIGTYPE_p_cmf__upslope__connections__Snowfall swig_types[114] +#define SWIGTYPE_p_cmf__upslope__connections__TOPModelFlow swig_types[115] +#define SWIGTYPE_p_cmf__upslope__connections__TopographicGradientDarcy swig_types[116] +#define SWIGTYPE_p_cmf__upslope__connections__lateral_sub_surface_flux swig_types[117] +#define SWIGTYPE_p_cmf__upslope__layer_list swig_types[118] +#define SWIGTYPE_p_cmf__upslope__neighbor_iterator swig_types[119] +#define SWIGTYPE_p_cmf__upslope__subcatchment swig_types[120] +#define SWIGTYPE_p_cmf__upslope__vegetation__Vegetation swig_types[121] +#define SWIGTYPE_p_cmf__water__Adsorption swig_types[122] +#define SWIGTYPE_p_cmf__water__ConstraintLinearStorageConnection swig_types[123] +#define SWIGTYPE_p_cmf__water__DirichletBoundary swig_types[124] +#define SWIGTYPE_p_cmf__water__ExponentialDeclineConnection swig_types[125] +#define SWIGTYPE_p_cmf__water__FreundlichAdsorbtion swig_types[126] +#define SWIGTYPE_p_cmf__water__LangmuirAdsorption swig_types[127] +#define SWIGTYPE_p_cmf__water__LinearAdsorption swig_types[128] +#define SWIGTYPE_p_cmf__water__LinearStorageConnection swig_types[129] +#define SWIGTYPE_p_cmf__water__NeumannBoundary swig_types[130] +#define SWIGTYPE_p_cmf__water__NeumannBoundary_list swig_types[131] +#define SWIGTYPE_p_cmf__water__NeumannFlux swig_types[132] +#define SWIGTYPE_p_cmf__water__NullAdsorption swig_types[133] +#define SWIGTYPE_p_cmf__water__PowerLawConnection swig_types[134] +#define SWIGTYPE_p_cmf__water__SoluteStorage swig_types[135] +#define SWIGTYPE_p_cmf__water__SoluteTimeseries swig_types[136] +#define SWIGTYPE_p_cmf__water__SystemBridge swig_types[137] +#define SWIGTYPE_p_cmf__water__SystemBridgeConnection swig_types[138] +#define SWIGTYPE_p_cmf__water__TechnicalFlux swig_types[139] +#define SWIGTYPE_p_cmf__water__WaterStorage swig_types[140] +#define SWIGTYPE_p_cmf__water__bidirectional_kinematic_exchange swig_types[141] +#define SWIGTYPE_p_cmf__water__connection_list swig_types[142] +#define SWIGTYPE_p_cmf__water__constraint_kinematic_wave swig_types[143] +#define SWIGTYPE_p_cmf__water__external_control_connection swig_types[144] +#define SWIGTYPE_p_cmf__water__flux_connection swig_types[145] +#define SWIGTYPE_p_cmf__water__flux_integrator swig_types[146] +#define SWIGTYPE_p_cmf__water__flux_node swig_types[147] +#define SWIGTYPE_p_cmf__water__generic_gradient_connection swig_types[148] +#define SWIGTYPE_p_cmf__water__kinematic_wave swig_types[149] +#define SWIGTYPE_p_cmf__water__linear_scale swig_types[150] +#define SWIGTYPE_p_cmf__water__node_list swig_types[151] +#define SWIGTYPE_p_cmf__water__solute swig_types[152] +#define SWIGTYPE_p_cmf__water__solute_vector swig_types[153] +#define SWIGTYPE_p_cmf__water__statecontrol_connection swig_types[154] +#define SWIGTYPE_p_cmf__water__waterbalance_connection swig_types[155] +#define SWIGTYPE_p_cmf__water__waterbalance_integrator swig_types[156] +#define SWIGTYPE_p_const_iterator swig_types[157] +#define SWIGTYPE_p_difference_type swig_types[158] +#define SWIGTYPE_p_double swig_types[159] +#define SWIGTYPE_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void swig_types[160] +#define SWIGTYPE_p_iterator swig_types[161] +#define SWIGTYPE_p_p_PyObject swig_types[162] +#define SWIGTYPE_p_ptr swig_types[163] +#define SWIGTYPE_p_size_type swig_types[164] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[165] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[166] +#define SWIGTYPE_p_std__allocatorT_size_t_t swig_types[167] +#define SWIGTYPE_p_std__invalid_argument swig_types[168] +#define SWIGTYPE_p_std__shared_ptrT_SoilLayer_t swig_types[169] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t swig_types[170] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t swig_types[171] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__MeteoStation_t swig_types[172] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainSource_t swig_types[173] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t swig_types[174] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__RainfallStation_t swig_types[175] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__TimeseriesRainSource_t swig_types[176] +#define SWIGTYPE_p_std__shared_ptrT_cmf__atmosphere__aerodynamic_resistance_t swig_types[177] +#define SWIGTYPE_p_std__shared_ptrT_cmf__math__StateVariable_t swig_types[178] +#define SWIGTYPE_p_std__shared_ptrT_cmf__math__integratable_t swig_types[179] +#define SWIGTYPE_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t swig_types[180] +#define SWIGTYPE_p_std__shared_ptrT_cmf__river__Reach_t swig_types[181] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__ShuttleworthWallace_t swig_types[182] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__ET__aerodynamic_resistance_t swig_types[183] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__MacroPore_t swig_types[184] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SoilLayer_t swig_types[185] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__SurfaceWater_t swig_types[186] +#define SWIGTYPE_p_std__shared_ptrT_cmf__upslope__aquifer_t swig_types[187] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__DirichletBoundary_t swig_types[188] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__NeumannBoundary_t swig_types[189] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SoluteStorage_t swig_types[190] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__SystemBridge_t swig_types[191] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__WaterStorage_t swig_types[192] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_connection_t swig_types[193] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_integrator_t swig_types[194] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__flux_node_t swig_types[195] +#define SWIGTYPE_p_std__shared_ptrT_cmf__water__waterbalance_integrator_t swig_types[196] +#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t swig_types[197] +#define SWIGTYPE_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t swig_types[198] +#define SWIGTYPE_p_std__string swig_types[199] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[200] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[201] +#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[202] +#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t swig_types[203] +#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator swig_types[204] +#define SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator swig_types[205] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[206] +#define SWIGTYPE_p_value_type swig_types[207] +static swig_type_info *swig_types[209]; +static swig_module_info swig_module = {swig_types, 208, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3326,151 +3339,156 @@ namespace swig { #include -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} +#include +#if PY_VERSION_HEX >= 0x03020000 +# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) +#else +# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) +#endif - #include "cmfmemory.h" +#include +#include -// ********************************************************************************************** -// %iterable_to_list(LISTTYPE,ITEMTYPE) typemap system. Puts a function template into the header for general usage -// Function to convert an iterable to a list type (class with append function). For use in typemaps - template - int iterable_to_list(PyObject* iterable,swig_type_info* _item_descriptor, _Ty& temp_list) { - PyObject* iter = PyObject_GetIter(iterable); - if (iter == 0) { - // no iterator - return SWIG_ERROR; - } - while (PyObject* py_item = PyIter_Next(iter)) { - _item_type* item=0; - // if the item is a node, append to node_list - int is_ok = SWIG_ConvertPtr(py_item, (void**)&item, _item_descriptor, SWIG_POINTER_EXCEPTION); - if (is_ok == 0 && item != 0 ) { - temp_list.append(*item); - } - Py_DECREF(py_item); - } - Py_DECREF(iter); - return SWIG_OK; + +#if defined(__GNUC__) +# if __GNUC__ == 2 && __GNUC_MINOR <= 96 +# define SWIG_STD_NOMODERN_STL +# endif +#endif + + +#include + + +namespace swig { + struct stop_iteration { + }; + + struct SwigPyIterator { + private: + SwigPtr_PyObject _seq; + + protected: + SwigPyIterator(PyObject *seq) : _seq(seq) + { } + + public: + virtual ~SwigPyIterator() {} + + // Access iterator method, required by Python + virtual PyObject *value() const = 0; + + // Forward iterator method, required by Python + virtual SwigPyIterator *incr(size_t n = 1) = 0; - int is_listtype_or_iterable(PyObject* input, swig_type_info* listtype_descriptor) { - // Checks if a type has the given descriptor or is iterable - void * pt; - int res=SWIG_ConvertPtr(input,&pt,listtype_descriptor,0); - if (SWIG_IsOK(res)) { - return 1; - } else { - PyObject* iter = PyObject_GetIter(input); - if (iter != 0) { - Py_DECREF(iter); - return 2; - } - else return 0; - } + // Backward iterator method, very common in C++, but not required in Python + virtual SwigPyIterator *decr(size_t /*n*/ = 1) + { + throw stop_iteration(); } + // Random access iterator methods, but not required in Python + virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } -std::string pyrepr(PyObject* o) { - PyObject* s = PyObject_Repr(o); - #if PY_MAJOR_VERSION < 3 - std::string res = PyString_AsString(s); - #else - std::string res = PyUnicode_AsUTF8(s); - #endif - Py_XDECREF(s); - return res; -} + virtual bool equal (const SwigPyIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + // C++ common/needed methods + virtual SwigPyIterator *copy() const = 0; + PyObject *next() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + PyObject *obj = value(); + incr(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + /* Make an alias for Python 3.x */ + PyObject *__next__() + { + return next(); + } -// numpy/arrayobject.h requires this Macro-constant. Some Compilers (e.g. gcc) defines it internally, others (e.g. VS2008) not -#ifndef SIZEOF_LONG_DOUBLE -#define SIZEOF_LONG_DOUBLE sizeof(long double) -#endif -#ifndef NPY_NO_DEPRECATED_API -#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION -#endif + PyObject *previous() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + decr(); + PyObject *obj = value(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } -// including numpy array definition -#include -// including my array header -#include "math/num_array.h" + SwigPyIterator *advance(ptrdiff_t n) + { + return (n > 0) ? incr(n) : decr(-n); + } + + bool operator == (const SwigPyIterator& x) const + { + return equal(x); + } + + bool operator != (const SwigPyIterator& x) const + { + return ! operator==(x); + } + + SwigPyIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + SwigPyIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + SwigPyIterator* operator + (ptrdiff_t n) const + { + return copy()->advance(n); + } -#ifndef NPY_ARRAY_CARRAY -#define NPY_ARRAY_CARRAY NPY_CARRAY -#endif + SwigPyIterator* operator - (ptrdiff_t n) const + { + return copy()->advance(-n); + } + + ptrdiff_t operator - (const SwigPyIterator& x) const + { + return x.distance(*this); + } + + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_TypeQuery("swig::SwigPyIterator *"); + init = 1; + } + return desc; + } + }; -#ifndef NPY_ARRAY_OWNDATA -#define NPY_ARRAY_OWNDATA NPY_OWNDATA +#if defined(SWIGPYTHON_BUILTIN) + inline PyObject* make_output_iterator_builtin (PyObject *pyself) + { + Py_INCREF(pyself); + return pyself; + } #endif - -bool test_npy_array(PyObject* op) { - PyObject* ao = PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); - if (!ao) // If given object was not convertable into an array - return false; - else { - Py_DECREF(ao); - return true; - } -} -// This function creates a numpy array from an num_array. -// The data of the num_array is afterwards owned by the numpy array. -PyObject* as_npy_array(cmf::math::num_array& a) -{ - // Size of the 1d array - npy_intp dims[1] = {a.size()}; - // pointer to the data of the 1d array - cmf::math::num_array::iterator start = a.release(); - // Creates the numpy array using size, place and type information - int flags = NPY_ARRAY_CARRAY | NPY_ARRAY_OWNDATA; - return PyArray_New( - &PyArray_Type,1,dims,NPY_DOUBLE,0, - (void *)start,0,flags,0); -} -// This function creates a new array from any object providing the array interface or from a sequence. -// First a numpy array is created to ensure right ordering, secondly an array is created by copying the given data. -ptrdiff_t from_npy_array(PyObject* op,double ** data) { - // Create a contiguous and behaved numpy array from the given object - // May include a copy of the data - // Returns NULL if: - // - given object was not a sequence of numbers or an object exposing the array interface or - // - array had more dimensions - PyArrayObject* ao = (PyArrayObject*)PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); - if (!ao) {// If given object was not convertable into an array (no sequence of numbers or implementation of the array interface) - return 0; - } else { - // Get pointer to data - double * p_array=(double*)PyArray_DATA(ao); - // Get size - ptrdiff_t size = (ptrdiff_t)PyArray_DIM(ao,0); - double * res=new double[size]; - for (ptrdiff_t i=0;i -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { @@ -3554,16 +3572,21 @@ SWIG_CanCastAsInteger(double *d, double min, double max) { SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } } else #endif if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); + unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; @@ -3575,7 +3598,7 @@ SWIG_AsVal_long (PyObject *obj, long* val) #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; - long v = PyInt_AsLong(obj); + unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); @@ -3585,8 +3608,8 @@ SWIG_AsVal_long (PyObject *obj, long* val) if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); return res; } } @@ -3596,34 +3619,14 @@ SWIG_AsVal_long (PyObject *obj, long* val) } -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< int >(v); - } - } - return res; -} - - -#include "math/spline.h" - - - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); -} +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) @@ -3632,125 +3635,145 @@ SWIG_From_unsigned_SS_long (unsigned long value) #ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) { - return (value > LONG_MAX) ? - PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; } #endif -SWIGINTERNINLINE PyObject * -SWIG_From_size_t (size_t value) -{ +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; #ifdef SWIG_LONG_LONG_AVAILABLE if (sizeof(size_t) <= sizeof(unsigned long)) { #endif - return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); #ifdef SWIG_LONG_LONG_AVAILABLE - } else { - /* assume sizeof(size_t) <= sizeof(unsigned long long) */ - return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); } #endif + return res; } - #define SWIG_From_double PyFloat_FromDouble + #define SWIG_From_long PyInt_FromLong -// Include geometry -#include "geometry/geometry.h" -static bool check_seq_point(PyObject* input) { - if (PySequence_Check(input)) { - Py_ssize_t len = PySequence_Length(input); - if (len==2 || len==3) - return true; - } - return false; -} -static std::string convert_seq_to_point(PyObject* input,cmf::geometry::point& p) +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_long_SS_long (long long value) { - double temp[3]; - ptrdiff_t len=PyObject_Length(input); - if (len<2) { - std::string res = "Sequence <"; - res += pyrepr(input); - res+="> has to few items to convert to cmf.point. At least two items are needed"; - return res; - } else if (len>3) { - std::string res = "Sequence <"; - res+=pyrepr(input); - res+="> has to many items (more than 3) to convert to cmf.point."; - return res; - } - - for (int i=0;i LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); } +#endif -static bool check_xy(PyObject* input) { - return PyObject_HasAttrString(input,"x") - && PyObject_HasAttrString(input,"y"); -} -// Helper function to convert any class with an x,y,z (z optional) attribute to a point (with check) -static std::string convert_xyz_to_point(PyObject* input,cmf::geometry::point& p) -{ - PyObject - *x= PyObject_GetAttrString(input, "x"), - *y= PyObject_GetAttrString(input, "y"), - *z= PyObject_HasAttrString(input, "z") ? PyObject_GetAttrString(input, "z") : 0; - if (PyNumber_Check(x) && PyNumber_Check(y)) { - p.x=PyFloat_AsDouble(x); - p.y=PyFloat_AsDouble(y); - p.z=0.0; + +SWIGINTERNINLINE PyObject * +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + return SWIG_From_long (static_cast< long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE } else { - std::string res="Can't convert <"; - res += pyrepr(x); - res += "> to x coordinate or <"; - res += pyrepr(y); - res += "> to y coordinate"; - Py_DECREF(x);Py_DECREF(y);Py_XDECREF(z); - return res; + /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ + return SWIG_From_long_SS_long (static_cast< long long >(value)); } - if (z && PyNumber_Check(z)) { - p.z=PyFloat_AsDouble(z); - } - Py_DECREF(x);Py_DECREF(z);Py_XDECREF(z); - return ""; +#endif } - - SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { return PyBool_FromLong(value ? 1 : 0); } -SWIGINTERN int cmf_geometry_point___len__(cmf::geometry::point const *self){ return 3; } -SWIGINTERN cmf::geometry::point cmf_geometry_point___rmul__(cmf::geometry::point *self,double val){ - return val*(*self); + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; } -SWIGINTERN cmf::geometry::point cmf_geometry_point___rdiv__(cmf::geometry::point *self,double val){ - return val/(*self); + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } } + } +#endif + return SWIG_TypeError; +} + #ifdef SWIG_LONG_LONG_AVAILABLE SWIGINTERN int @@ -3815,797 +3838,10152 @@ SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) } -#include "datetime.h" -#include "math/real.h" -#include "math/time.h" -#include "math/timeseries.h" +#include -static cmf::math::Time convert_datetime_to_cmftime(PyObject* dt) { - cmf::math::Time* swigtime=0; - int res=SWIG_ConvertPtr(dt,(void**)(&swigtime),SWIGTYPE_p_cmf__math__Time,0); - if (SWIG_IsOK(res) && swigtime!=0) { - return *swigtime; - } else if (PyDateTime_Check(dt)) { - return cmf::math::Time(PyDateTime_GET_DAY(dt), - PyDateTime_GET_MONTH(dt), - PyDateTime_GET_YEAR(dt), - PyDateTime_DATE_GET_HOUR(dt), - PyDateTime_DATE_GET_MINUTE(dt), - PyDateTime_DATE_GET_SECOND(dt), - PyDateTime_DATE_GET_MICROSECOND(dt)/1000); - } else if (PyDate_Check(dt)) { - return cmf::math::Time(PyDateTime_GET_DAY(dt), - PyDateTime_GET_MONTH(dt), - PyDateTime_GET_YEAR(dt)); - } else if (PyDelta_Check(dt)) { - PyDateTime_Delta* delta=(PyDateTime_Delta*)(dt); - long long ms=24 * 3600; - ms*=delta->days; - ms+=delta->seconds; - ms*=1000; - ms+=delta->microseconds/1000; - return cmf::math::timespan(ms); - } else { - return cmf::math::never; - } - -} -static bool check_time(PyObject* dt) { - void * pT = 0; - int res=SWIG_ConvertPtr(dt,&pT,SWIGTYPE_p_cmf__math__Time,0); - if (SWIG_IsOK(res) && pT!=0) return true; - else if (PyDateTime_Check(dt)) return true; - else if (PyDelta_Check(dt)) return true; - else if (PyDate_Check(dt)) return true; - else return false; -} +#include + + +namespace swig { + template + struct noconst_traits { + typedef Type noconst_type; + }; + template + struct noconst_traits { + typedef Type noconst_type; + }; + /* + type categories + */ + struct pointer_category { }; + struct value_category { }; + /* + General traits that provides type_name and type_info + */ + template struct traits { }; -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; + template + inline const char* type_name() { + return traits::noconst_type >::type_name(); } - return info; + + template struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name()); + return info; + } + }; + + /* + Partial specialization for pointers (traits_info) + */ + template struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name()); + return info; + } + }; + + template + inline swig_type_info *type_info() { + return traits_info::type_info(); + } + + /* + Partial specialization for pointers (traits) + */ + template struct traits { + typedef pointer_category category; + static std::string make_ptr_name(const char* name) { + std::string ptrname = name; + ptrname += " *"; + return ptrname; + } + static const char* type_name() { + static std::string name = make_ptr_name(swig::type_name()); + return name.c_str(); + } + }; + + template + struct traits_as { }; + + template + struct traits_check { }; + } -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#else -#if PY_VERSION_HEX >= 0x03010000 - return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); -#else - return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#endif -#endif -#else - return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); -#endif +namespace swig { + /* + Traits that provides the from method + */ + template struct traits_from_ptr { + static PyObject *from(Type *val, int owner = 0) { + return SWIG_InternalNewPointerObj(val, type_info(), owner); } - } else { - return SWIG_Py_Void(); - } -} + }; + template struct traits_from { + static PyObject *from(const Type& val) { + return traits_from_ptr::from(new Type(val), 1); + } + }; -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} + template struct traits_from { + static PyObject *from(Type* val) { + return traits_from_ptr::from(val, 0); + } + }; + template struct traits_from { + static PyObject *from(const Type* val) { + return traits_from_ptr::from(const_cast(val), 0); + } + }; -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERNINLINE PyObject* -SWIG_From_long_SS_long (long long value) -{ - return ((value < LONG_MIN) || (value > LONG_MAX)) ? - PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); -} -#endif + template + inline PyObject *from(const Type& val) { + return traits_from::from(val); + } -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 -#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; + template + inline PyObject *from_ptr(Type* val, int owner) { + return traits_from_ptr::from(val, owner); + } + + /* + Traits that provides the asval/as/check method + */ + template + struct traits_asptr { + static int asptr(PyObject *obj, Type **val) { + Type *p; + swig_type_info *descriptor = type_info(); + int res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res)) { + if (val) *val = p; + } + return res; } - obj = PyUnicode_AsUTF8String(obj); - if(alloc) *alloc = SWIG_NEWOBJ; -#endif - PyBytes_AsStringAndSize(obj, &cstr, &len); -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. + }; - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; + template + inline int asptr(PyObject *obj, Type **vptr) { + return traits_asptr::asptr(obj, vptr); + } + + template + struct traits_asval { + static int asval(PyObject *obj, Type *val) { + if (val) { + Type *p = 0; + int res = traits_asptr::asptr(obj, &p); + if (!SWIG_IsOK(res)) return res; + if (p) { + typedef typename noconst_traits::noconst_type noconst_type; + *(const_cast(val)) = *p; + if (SWIG_IsNewObj(res)){ + delete p; + res = SWIG_DelNewMask(res); + } + return res; } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; + return SWIG_ERROR; } } else { -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - *cptr = PyBytes_AsString(obj); -#else - assert(0); /* Should never reach here with Unicode strings in Python 3 */ -#endif -#else - *cptr = SWIG_Python_str_AsChar(obj); -#endif + return traits_asptr::asptr(obj, (Type **)(0)); } } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - } - if (psize) *psize = len + 1; + }; - Py_XDECREF(obj); - return SWIG_OK; + template struct traits_asval { + static int asval(PyObject *obj, Type **val) { + if (val) { + typedef typename noconst_traits::noconst_type noconst_type; + noconst_type *p = 0; + int res = traits_asptr::asptr(obj, &p); + if (SWIG_IsOK(res)) { + *(const_cast(val)) = p; + } + return res; } else { - Py_XDECREF(obj); + return traits_asptr::asptr(obj, (Type **)(0)); } } -#endif -#endif + }; + + template + inline int asval(PyObject *obj, Type *val) { + return traits_asval::asval(obj, val); + } - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; + template + struct traits_as { + static Type as(PyObject *obj, bool throw_error) { + Type v; + int res = asval(obj, &v); + if (!obj || !SWIG_IsOK(res)) { + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name()); + } + if (throw_error) throw std::invalid_argument("bad type"); } + return v; } - } - return SWIG_TypeError; -} + }; + template + struct traits_as { + static Type as(PyObject *obj, bool throw_error) { + Type *v = 0; + int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res) && v) { + if (SWIG_IsNewObj(res)) { + Type r(*v); + delete v; + return r; + } else { + return *v; + } + } else { + // Uninitialized return value, no Type() constructor required. + static Type *v_def = (Type*) malloc(sizeof(Type)); + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + if (throw_error) throw std::invalid_argument("bad type"); + memset(v_def,0,sizeof(Type)); + return *v_def; + } + } + }; -SWIGINTERN int -SWIG_AsCharArray(PyObject * obj, char *val, size_t size) -{ - char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; - int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); - if (SWIG_IsOK(res)) { - /* special case of single char conversion when we don't need space for NUL */ - if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; - if (csize <= size) { - if (val) { - if (csize) memcpy(val, cptr, csize*sizeof(char)); - if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); + template + struct traits_as { + static Type* as(PyObject *obj, bool throw_error) { + Type *v = 0; + int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res)) { + return v; + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + if (throw_error) throw std::invalid_argument("bad type"); + return 0; } - if (alloc == SWIG_NEWOBJ) { - delete[] cptr; - res = SWIG_DelNewMask(res); - } - return res; } - if (alloc == SWIG_NEWOBJ) delete[] cptr; + }; + + template + inline Type as(PyObject *obj, bool te = false) { + return traits_as::category>::as(obj, te); } - return SWIG_TypeError; -} + template + struct traits_check { + static bool check(PyObject *obj) { + int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; -SWIGINTERN int -SWIG_AsVal_char (PyObject * obj, char *val) -{ - int res = SWIG_AsCharArray(obj, val, 1); - if (!SWIG_IsOK(res)) { - long v; - res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); - if (SWIG_IsOK(res)) { - if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { - if (val) *val = static_cast< char >(v); - } else { - res = SWIG_OverflowError; - } + template + struct traits_check { + static bool check(PyObject *obj) { + int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; } + }; + + template + inline bool check(PyObject *obj) { + return traits_check::category>::check(obj); } - return res; } -#define cmf_math_timeseries_begin_get(self_) new cmf::math::Time(self_->begin()) - +#include -#define cmf_math_timeseries_step_get(self_) new cmf::math::Time(self_->step()) - +namespace std { + template <> + struct less + { + bool + operator()(PyObject * v, PyObject *w) const + { + bool res; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; + /* This may fall into a case of inconsistent + eg. ObjA > ObjX > ObjB + but ObjA < ObjB + */ + if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) + { + /* Objects can't be compared, this mostly occurred in Python 3.0 */ + /* Compare their ptr directly for a workaround */ + res = (v < w); + PyErr_Clear(); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; -#define cmf_math_timeseries_end_get(self_) new cmf::math::Time(self_->end()) - + template <> + struct less + { + bool + operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const + { + return std::less()(v, w); + } + }; -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; + template <> + struct less + { + bool + operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const + { + return std::less()(v, w); } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; + }; + +} + +namespace swig { + template <> struct traits { + typedef value_category category; + static const char* type_name() { return "PyObject *"; } + }; + + template <> struct traits_asval { + typedef PyObject * value_type; + static int asval(PyObject *obj, value_type *val) { + if (val) *val = obj; return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); + }; + + template <> + struct traits_check { + static bool check(PyObject *) { + return true; } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } + }; + + template <> struct traits_from { + typedef PyObject * value_type; + static PyObject *from(const value_type& val) { + Py_XINCREF(val); + return val; } - } -#endif - return SWIG_TypeError; + }; + } - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; +namespace swig { + template + inline size_t + check_index(Difference i, size_t size, bool insert = false) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) + return (size_t) (i + size); + } else if ( (size_t) i < size ) { + return (size_t) i; + } else if (insert && ((size_t) i == size)) { + return size; + } + throw std::out_of_range("index out of range"); + } + + template + void + slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) { + if (step == 0) { + throw std::invalid_argument("slice step cannot be zero"); + } else if (step > 0) { + // Required range: 0 <= i < size, 0 <= j < size, i <= j + if (i < 0) { + ii = 0; + } else if (i < (Difference)size) { + ii = i; + } else if (insert && (i >= (Difference)size)) { + ii = (Difference)size; + } + if (j < 0) { + jj = 0; + } else { + jj = (j < (Difference)size) ? j : (Difference)size; + } + if (jj < ii) + jj = ii; } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; + // Required range: -1 <= i < size-1, -1 <= j < size-1, i >= j + if (i < -1) { + ii = -1; + } else if (i < (Difference) size) { + ii = i; + } else if (i >= (Difference)(size-1)) { + ii = (Difference)(size-1); + } + if (j < -1) { + jj = -1; + } else { + jj = (j < (Difference)size ) ? j : (Difference)(size-1); + } + if (ii < jj) + ii = jj; } } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); - } - res = SWIG_TypeError; + + template + inline typename Sequence::iterator + getpos(Sequence* self, Difference i) { + typename Sequence::iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; } -#endif - return res; -} -#endif + template + inline typename Sequence::const_iterator + cgetpos(const Sequence* self, Difference i) { + typename Sequence::const_iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + template + inline void + erase(Sequence* seq, const typename Sequence::iterator& position) { + seq->erase(position); } -#endif - return res; -} + template + struct traits_reserve { + static void reserve(Sequence & /*seq*/, typename Sequence::size_type /*n*/) { + // This should be specialized for types that support reserve + } + }; -SWIGINTERN int -SWIG_AsPtr_std_string (PyObject * obj, std::string **val) -{ - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { - if (buf) { - if (val) *val = new std::string(buf, size - 1); - if (alloc == SWIG_NEWOBJ) delete[] buf; - return SWIG_NEWOBJ; + template + inline Sequence* + getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj); + + if (step > 0) { + typename Sequence::const_iterator sb = self->begin(); + typename Sequence::const_iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + if (step == 1) { + return new Sequence(sb, se); + } else { + Sequence *sequence = new Sequence(); + swig::traits_reserve::reserve(*sequence, (jj - ii + step - 1) / step); + typename Sequence::const_iterator it = sb; + while (it!=se) { + sequence->push_back(*it); + for (Py_ssize_t c=0; c::reserve(*sequence, (ii - jj - step - 1) / -step); + typename Sequence::const_reverse_iterator sb = self->rbegin(); + typename Sequence::const_reverse_iterator se = self->rbegin(); + std::advance(sb,size-ii-1); + std::advance(se,size-jj-1); + typename Sequence::const_reverse_iterator it = sb; + while (it!=se) { + sequence->push_back(*it); + for (Py_ssize_t c=0; c<-step && it!=se; ++c) + it++; + } + return sequence; + } + } + + template + inline void + setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj, true); + if (step > 0) { + if (step == 1) { + size_t ssize = jj - ii; + if (ssize <= is.size()) { + // expanding/staying the same size + swig::traits_reserve::reserve(*self, self->size() - ssize + is.size()); + typename Sequence::iterator sb = self->begin(); + typename InputSeq::const_iterator isit = is.begin(); + std::advance(sb,ii); + std::advance(isit, jj - ii); + self->insert(std::copy(is.begin(), isit, sb), isit, is.end()); + } else { + // shrinking + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + sb = self->begin(); + std::advance(sb,ii); + self->insert(sb, is.begin(), is.end()); + } + } else { + size_t replacecount = (jj - ii + step - 1) / step; + if (is.size() != replacecount) { + char msg[1024]; + sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); + throw std::invalid_argument(msg); + } + typename Sequence::const_iterator isit = is.begin(); + typename Sequence::iterator it = self->begin(); + std::advance(it,ii); + for (size_t rc=0; rcend(); ++c) + it++; + } + } + } else { + size_t replacecount = (ii - jj - step - 1) / -step; + if (is.size() != replacecount) { + char msg[1024]; + sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); + throw std::invalid_argument(msg); + } + typename Sequence::const_iterator isit = is.begin(); + typename Sequence::reverse_iterator it = self->rbegin(); + std::advance(it,size-ii-1); + for (size_t rc=0; rcrend(); ++c) + it++; + } + } + } + + template + inline void + delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj, true); + if (step > 0) { + typename Sequence::iterator sb = self->begin(); + std::advance(sb,ii); + if (step == 1) { + typename Sequence::iterator se = self->begin(); + std::advance(se,jj); + self->erase(sb,se); + } else { + typename Sequence::iterator it = sb; + size_t delcount = (jj - ii + step - 1) / step; + while (delcount) { + it = self->erase(it); + for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) + it++; + delcount--; + } + } + } else { + typename Sequence::reverse_iterator sb = self->rbegin(); + std::advance(sb,size-ii-1); + typename Sequence::reverse_iterator it = sb; + size_t delcount = (ii - jj - step - 1) / -step; + while (delcount) { + it = typename Sequence::reverse_iterator(self->erase((++it).base())); + for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) + it++; + delcount--; + } } } - return SWIG_ERROR; } -SWIGINTERN ptrdiff_t cmf_math_timeseries___len__(cmf::math::timeseries *self){ - return self->size(); - } -SWIGINTERNINLINE PyObject * -SWIG_From_ptrdiff_t (ptrdiff_t value) -{ -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(ptrdiff_t) <= sizeof(long)) { -#endif - return SWIG_From_long (static_cast< long >(value)); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else { - /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ - return SWIG_From_long_SS_long (static_cast< long long >(value)); - } +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) +# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) +# define SWIG_STD_NOITERATOR_TRAITS_STL +# endif #endif -} +#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) +#include +#else +namespace std { + template + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef typename Iterator::value_type value_type; + }; -#include "math/statevariable.h" + template + struct iterator_traits<__reverse_bi_iterator > { + typedef Distance difference_type; + typedef T value_type; + }; + template + struct iterator_traits { + typedef T value_type; + typedef ptrdiff_t difference_type; + }; -#define cmf_math_StateVariable_state_get(self_) self_->get_state() -#define cmf_math_StateVariable_state_set(self_, val_) self_->set_state(val_) - -SWIGINTERN size_t cmf_math_integratable_list___len__(cmf::math::integratable_list const *self){ - return self->size(); - } -SWIGINTERN size_t cmf_math_StateVariableList___len__(cmf::math::StateVariableList const *self){ - return self->size(); + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; } + return __n; + } +} +#endif - // Include Water - #include "water/Solute.h" - #include "water/SoluteStorage.h" - #include "water/WaterStorage.h" - #include "water/flux_connection.h" - #include "water/boundary_condition.h" - #include "water/simple_connections.h" - #include "water/system_bridge.h" - -SWIGINTERN std::string cmf_water_solute___repr__(cmf::water::solute *self){ return "[" + self->Name + "]"; } -SWIGINTERN cmf::water::solute *cmf_water_solute_vector___getitem__(cmf::water::solute_vector *self,int i){ - return self->get_solute(i); - } -SWIGINTERN size_t cmf_water_solute_vector___len__(cmf::water::solute_vector *self){ return self->size();} -SWIGINTERN cmf::math::timeseries &cmf_water_SoluteTimeseries___getitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute){ - return (*self)[solute]; - } -SWIGINTERN void cmf_water_SoluteTimeseries___setitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute,cmf::math::timeseries concentration){ - (*self)[solute]=concentration; - } -SWIGINTERN size_t cmf_water_SoluteTimeseries___len__(cmf::water::SoluteTimeseries const *self){ - return self->size(); - } -#define cmf_water_SoluteStorage_conc_get(self_) self_->get_conc() -#define cmf_water_SoluteStorage_conc_set(self_, val_) self_->set_conc(val_) - +namespace swig { + template + class SwigPyIterator_T : public SwigPyIterator + { + public: + typedef OutIterator out_iterator; + typedef typename std::iterator_traits::value_type value_type; + typedef SwigPyIterator_T self_type; -#define cmf_water_flux_node_project_get(self_) &self_->get_project() - + SwigPyIterator_T(out_iterator curr, PyObject *seq) + : SwigPyIterator(seq), current(curr) + { + } -#define cmf_water_flux_node_potential_get(self_) self_->get_potential() -#define cmf_water_flux_node_potential_set(self_, val_) self_->set_potential(val_) - + const out_iterator& get_current() const + { + return current; + } -#define cmf_water_flux_node_connections_get(self_) new cmf::water::connection_list(self_->get_connections()) + + bool equal (const SwigPyIterator &iter) const + { + const self_type *iters = dynamic_cast(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + ptrdiff_t distance(const SwigPyIterator &iter) const + { + const self_type *iters = dynamic_cast(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + protected: + out_iterator current; + }; + template + struct from_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v); + } + }; -struct SWIG_null_deleter { - void operator() (void const *) const { - } -}; -#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter() -#define SWIG_NO_NULL_DELETER_1 -#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW -#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN + template::value_type, + typename FromOper = from_oper > + class SwigPyIteratorOpen_T : public SwigPyIterator_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T base; + typedef SwigPyIteratorOpen_T self_type; + + SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) + : SwigPyIterator_T(curr, seq) + { + } + + PyObject *value() const { + return from(static_cast(*(base::current))); + } + + SwigPyIterator *copy() const + { + return new self_type(*this); + } + SwigPyIterator *incr(size_t n = 1) + { + while (n--) { + ++base::current; + } + return this; + } -#define SWIG_NO_NULL_DELETER_SWIG_BUILTIN_INIT + SwigPyIterator *decr(size_t n = 1) + { + while (n--) { + --base::current; + } + return this; + } + }; + template::value_type, + typename FromOper = from_oper > + class SwigPyIteratorClosed_T : public SwigPyIterator_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T base; + typedef SwigPyIteratorClosed_T self_type; + + SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : SwigPyIterator_T(curr, seq), begin(first), end(last) + { + } + + PyObject *value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast(*(base::current))); + } + } + + SwigPyIterator *copy() const + { + return new self_type(*this); + } -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r; - if (!PyBool_Check(obj)) - return SWIG_ERROR; - r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} + SwigPyIterator *incr(size_t n = 1) + { + while (n--) { + if (base::current == end) { + throw stop_iteration(); + } else { + ++base::current; + } + } + return this; + } -SWIGINTERN size_t cmf_water_connection_list___len__(cmf::water::connection_list const *self){ return self->size();} -SWIGINTERN bool cmf_water_connection_list___contains__(cmf::water::connection_list const *self,cmf::water::flux_connection::ptr const &con){ return self->contains(con);} + SwigPyIterator *decr(size_t n = 1) + { + while (n--) { + if (base::current == begin) { + throw stop_iteration(); + } else { + --base::current; + } + } + return this; + } -#define cmf_water_WaterStorage_volume_get(self_) self_->get_volume() -#define cmf_water_WaterStorage_volume_set(self_, val_) self_->set_volume(val_) - + private: + out_iterator begin; + out_iterator end; + }; -#define cmf_water_WaterStorage_statevariable_get(self_) self_->get_state_variable_content() -#define cmf_water_WaterStorage_statevariable_set(self_, val_) self_->set_state_variable_content(val_) - + template + inline SwigPyIterator* + make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new SwigPyIteratorClosed_T(current, begin, end, seq); + } + + template + inline SwigPyIterator* + make_output_iterator(const OutIter& current, PyObject *seq = 0) + { + return new SwigPyIteratorOpen_T(current, seq); + } -SWIGINTERNINLINE PyObject * -SWIG_From_char (char c) -{ - return SWIG_FromCharPtrAndSize(&c,1); } -SWIGINTERN cmf::water::SoluteStorage &cmf_water_WaterStorage___getitem__(cmf::water::WaterStorage *self,cmf::water::solute X){ - return (*self)[X]; - } -#include "water/collections.h" +namespace swig +{ + template + struct SwigPySequence_Ref + { + SwigPySequence_Ref(PyObject* seq, Py_ssize_t index) + : _seq(seq), _index(index) + { + } + + operator T () const + { + swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); + try { + return swig::as(item, true); + } catch (std::exception& e) { + char msg[1024]; + sprintf(msg, "in sequence element %d ", (int)_index); + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name()); + } + SWIG_Python_AddErrorMsg(msg); + SWIG_Python_AddErrorMsg(e.what()); + throw; + } + } + SwigPySequence_Ref& operator=(const T& v) + { + PySequence_SetItem(_seq, _index, swig::from(v)); + return *this; + } -#define cmf_water_node_list_potentials_get(self_) self_->get_potentials() -#define cmf_water_node_list_potentials_set(self_, val_) self_->set_potentials(val_) - + private: + PyObject* _seq; + Py_ssize_t _index; + }; -#define cmf_water_NeumannBoundary_list_fluxes_get(self_) self_->get_fluxes() -#define cmf_water_NeumannBoundary_list_fluxes_set(self_, val_) self_->set_fluxes(val_) - + template + struct SwigPySequence_ArrowProxy + { + SwigPySequence_ArrowProxy(const T& x): m_value(x) {} + const T* operator->() const { return &m_value; } + operator const T*() const { return &m_value; } + T m_value; + }; - #include "atmosphere/Weather.h" - #include "atmosphere/meteorology.h" - #include "atmosphere/precipitation.h" + template + struct SwigPySequence_InputIterator + { + typedef SwigPySequence_InputIterator self; -SWIGINTERN double cmf_atmosphere_RainfallStation___call__(cmf::atmosphere::RainfallStation const *self,cmf::math::Time t){ return self->data[t]; } + typedef std::random_access_iterator_tag iterator_category; + typedef Reference reference; + typedef T value_type; + typedef T* pointer; + typedef Py_ssize_t difference_type; - #include "upslope/vegetation/StructVegetation.h" - #include "upslope/surfacewater.h" - #include "upslope/cell.h" - #include "upslope/Topology.h" - #include "upslope/algorithm.h" + SwigPySequence_InputIterator() + { + } + SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index) + : _seq(seq), _index(index) + { + } -SWIGINTERN std::string cmf_upslope_vegetation_Vegetation___repr__(cmf::upslope::vegetation::Vegetation *self){ - std::stringstream sstr; - sstr << "cmf.vegetation(\n" - << " Height = " << self->Height << " [m]" << std::endl - << " LAI = " << self->LAI << " [m2/m2]" << std::endl - << " albedo = " << self->albedo << " [W/W]" << std::endl - << " CanopyClosure = " << self->CanopyClosure << " [m2/m2]" << std::endl - << " CanopyPARExtinction = " << self->CanopyPARExtinction << std::endl - << " CanopyCapacityPerLAI = " << self->CanopyCapacityPerLAI << " [mm]" << std::endl - << " StomatalResistance = " << self->StomatalResistance << " [s/m]" << std::endl - << " RootDepth = " << self->RootDepth << " [m]" << std::endl - << " fraction_at_rootdepth = " << self->fraction_at_rootdepth << " [-]" << std::endl - << " RootContent = " << self->RootContent << " [kg/m3]" << std::endl - << ")" << std::endl; - return sstr.str(); + reference operator*() const + { + return reference(_seq, _index); } -#define cmf_upslope_Cell_topology_get(self_) &self_->get_topology() - + SwigPySequence_ArrowProxy + operator->() const { + return SwigPySequence_ArrowProxy(operator*()); + } -#define cmf_upslope_Cell_meteorology_get(self_) &self_->get_meteorology() -#define cmf_upslope_Cell_meteorology_set(self_, val_) self_->set_meteorology(*val_) - + bool operator==(const self& ri) const + { + return (_index == ri._index) && (_seq == ri._seq); + } -#define cmf_upslope_Cell_layers_get(self_) &self_->get_layers() - + bool operator!=(const self& ri) const + { + return !(operator==(ri)); + } -#define cmf_upslope_Cell_project_get(self_) &self_->get_project() - + self& operator ++ () + { + ++_index; + return *this; + } -#define cmf_upslope_Cell_saturated_depth_get(self_) self_->get_saturated_depth() -#define cmf_upslope_Cell_saturated_depth_set(self_, val_) self_->set_saturated_depth(val_) - + self& operator -- () + { + --_index; + return *this; + } -#define cmf_upslope_Cell_area_get(self_) self_->get_area() - + self& operator += (difference_type n) + { + _index += n; + return *this; + } -#define cmf_upslope_Cell_soildepth_get(self_) self_->get_soildepth() - -SWIGINTERN bool cmf_upslope_neighbor_iterator___eq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)==cmp;} -SWIGINTERN bool cmf_upslope_neighbor_iterator___neq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)!=cmp;} + self operator +(difference_type n) const + { + return self(_seq, _index + n); + } -#define cmf_upslope_cell_vector_lowest_get(self_) &self_->get_lowest() - + self& operator -= (difference_type n) + { + _index -= n; + return *this; + } -#define cmf_upslope_cell_vector_highest_get(self_) &self_->get_highest() - + self operator -(difference_type n) const + { + return self(_seq, _index - n); + } - // Include Upslope - #include "upslope/Soil/RetentionCurve.h" - #include "upslope/SoilLayer.h" + difference_type operator - (const self& ri) const + { + return _index - ri._index; + } + bool operator < (const self& ri) const + { + return _index < ri._index; + } -#define cmf_upslope_BrooksCoreyRetentionCurve_b_get(self_) self_->get_b() -#define cmf_upslope_BrooksCoreyRetentionCurve_b_set(self_, val_) self_->set_b(val_) - + reference + operator[](difference_type n) const + { + return reference(_seq, _index + n); + } -#define cmf_upslope_SoilLayer_gravitational_potential_get(self_) self_->get_gravitational_potential() - + private: + PyObject* _seq; + difference_type _index; + }; -#define cmf_upslope_SoilLayer_matrix_potential_get(self_) self_->get_matrix_potential() - + // STL container wrapper around a Python sequence + template + struct SwigPySequence_Cont + { + typedef SwigPySequence_Ref reference; + typedef const SwigPySequence_Ref const_reference; + typedef T value_type; + typedef T* pointer; + typedef Py_ssize_t difference_type; + typedef size_t size_type; + typedef const pointer const_pointer; + typedef SwigPySequence_InputIterator iterator; + typedef SwigPySequence_InputIterator const_iterator; + + SwigPySequence_Cont(PyObject* seq) : _seq(0) + { + if (!PySequence_Check(seq)) { + throw std::invalid_argument("a sequence is expected"); + } + _seq = seq; + Py_INCREF(_seq); + } -#define cmf_upslope_SoilLayer_wetness_get(self_) self_->get_wetness() -#define cmf_upslope_SoilLayer_wetness_set(self_, val_) self_->set_wetness(val_) - + ~SwigPySequence_Cont() + { + Py_XDECREF(_seq); + } -#define cmf_upslope_SoilLayer_theta_get(self_) self_->get_theta() -#define cmf_upslope_SoilLayer_theta_set(self_, val_) self_->set_theta(val_) - + size_type size() const + { + return static_cast(PySequence_Size(_seq)); + } -#define cmf_upslope_SoilLayer_K_get(self_) self_->get_K() - + bool empty() const + { + return size() == 0; + } -#define cmf_upslope_SoilLayer_Ksat_get(self_) self_->get_Ksat() - + iterator begin() + { + return iterator(_seq, 0); + } -#define cmf_upslope_SoilLayer_thickness_get(self_) self_->get_thickness() - + const_iterator begin() const + { + return const_iterator(_seq, 0); + } -#define cmf_upslope_SoilLayer_lower_boundary_get(self_) self_->get_lower_boundary() - + iterator end() + { + return iterator(_seq, size()); + } -#define cmf_upslope_SoilLayer_upper_boundary_get(self_) self_->get_upper_boundary() - + const_iterator end() const + { + return const_iterator(_seq, size()); + } -#define cmf_upslope_SoilLayer_porosity_get(self_) self_->get_porosity() - + reference operator[](difference_type n) + { + return reference(_seq, n); + } -#define cmf_upslope_SoilLayer_ice_fraction_get(self_) self_->get_ice_fraction() -#define cmf_upslope_SoilLayer_ice_fraction_set(self_, val_) self_->set_ice_fraction(val_) - + const_reference operator[](difference_type n) const + { + return const_reference(_seq, n); + } -#define cmf_upslope_SoilLayer_rootfraction_get(self_) self_->get_rootfraction() -#define cmf_upslope_SoilLayer_rootfraction_set(self_, val_) self_->set_rootfraction(val_) - + bool check(bool set_err = true) const + { + Py_ssize_t s = size(); + for (Py_ssize_t i = 0; i < s; ++i) { + swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); + if (!swig::check(item)) { + if (set_err) { + char msg[1024]; + sprintf(msg, "in sequence element %d", (int)i); + SWIG_Error(SWIG_RuntimeError, msg); + } + return false; + } + } + return true; + } -#define cmf_upslope_layer_list_gravitational_potential_get(self_) self_->get_gravitational_potential() - + private: + PyObject* _seq; + }; -#define cmf_upslope_layer_list_matrix_potential_get(self_) self_->get_matrix_potential() - +} -#define cmf_upslope_layer_list_wetness_get(self_) self_->get_wetness() - -#define cmf_upslope_layer_list_volume_get(self_) self_->get_volume() - +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} -#define cmf_upslope_layer_list_potential_get(self_) self_->get_potential() - -#define cmf_upslope_layer_list_K_get(self_) self_->get_K() - +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} -#define cmf_upslope_layer_list_Ksat_get(self_) self_->get_Ksat() - -#define cmf_upslope_layer_list_thickness_get(self_) self_->get_thickness() - +namespace swig { + template <> struct traits< int > { + typedef value_category category; + static const char* type_name() { return"int"; } + }; + template <> struct traits_asval< int > { + typedef int value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_int (obj, val); + } + }; + template <> struct traits_from< int > { + typedef int value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_int (val); + } + }; +} -#define cmf_upslope_layer_list_lower_boundary_get(self_) self_->get_lower_boundary() - -#define cmf_upslope_layer_list_upper_boundary_get(self_) self_->get_upper_boundary() - +namespace swig { + template + inline void + assign(const SwigPySeq& swigpyseq, Seq* seq) { + // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented + typedef typename SwigPySeq::value_type value_type; + typename SwigPySeq::const_iterator it = swigpyseq.begin(); + for (;it != swigpyseq.end(); ++it) { + seq->insert(seq->end(),(value_type)(*it)); + } + } + + template + struct traits_asptr_stdseq { + typedef Seq sequence; + typedef T value_type; + + static int asptr(PyObject *obj, sequence **seq) { + if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { + sequence *p; + swig_type_info *descriptor = swig::type_info(); + if (descriptor && SWIG_IsOK(::SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } else if (PySequence_Check(obj)) { + try { + SwigPySequence_Cont swigpyseq(obj); + if (seq) { + sequence *pseq = new sequence(); + assign(swigpyseq, pseq); + *seq = pseq; + return SWIG_NEWOBJ; + } else { + return swigpyseq.check() ? SWIG_OK : SWIG_ERROR; + } + } catch (std::exception& e) { + if (seq) { + if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, e.what()); + } + } + return SWIG_ERROR; + } + } + return SWIG_ERROR; + } + }; -#define cmf_upslope_layer_list_porosity_get(self_) self_->get_porosity() - + template + struct traits_from_stdseq { + typedef Seq sequence; + typedef T value_type; + typedef typename Seq::size_type size_type; + typedef typename sequence::const_iterator const_iterator; -#define cmf_upslope_layer_list_ice_fraction_get(self_) self_->get_ice_fraction() - + static PyObject *from(const sequence& seq) { +#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS + swig_type_info *desc = swig::type_info(); + if (desc && desc->clientdata) { + return SWIG_InternalNewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); + } +#endif + size_type size = seq.size(); + if (size <= (size_type)INT_MAX) { + PyObject *obj = PyTuple_New((Py_ssize_t)size); + Py_ssize_t i = 0; + for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { + PyTuple_SetItem(obj,i,swig::from(*it)); + } + return obj; + } else { + PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); + return NULL; + } + } + }; +} -#define cmf_upslope_layer_list_theta_get(self_) self_->get_theta() - -#define cmf_upslope_layer_list_root_get(self_) self_->get_rootfraction() - -SWIGINTERN cmf::upslope::SoilLayer::ptr cmf_upslope_layer_list___get(cmf::upslope::layer_list *self,int index){ return (*self)[index];} + namespace swig { + template + struct traits_reserve > { + static void reserve(std::vector &seq, typename std::vector::size_type n) { + seq.reserve(n); + } + }; -#include "upslope/macropore.h" + template + struct traits_asptr > { + static int asptr(PyObject *obj, std::vector **vec) { + return traits_asptr_stdseq >::asptr(obj, vec); + } + }; + + template + struct traits_from > { + static PyObject *from(const std::vector& vec) { + return traits_from_stdseq >::from(vec); + } + }; + } -#define cmf_upslope_MacroPore_filled_fraction_get(self_) self_->get_filled_fraction() - + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "int" "," "std::allocator< int >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ + return self->size(); + } -#define cmf_upslope_MacroPore_K_get(self_) self_->get_K() - +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} -#define cmf_upslope_MacroPore_capacity_get(self_) self_->get_capacity() - -#define cmf_upslope_MacroPore_cell_get(self_) self_->get_cell() - +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif - #include "reach/ReachType.h" - #include "reach/OpenWaterStorage.h" - #include "reach/Reach.h" - #include "reach/cross_section_reach.h" +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); + } +#endif +} -#define cmf_river_OpenWaterStorage_depth_get(self_) self_->get_depth() -#define cmf_river_OpenWaterStorage_depth_set(self_, val_) self_->set_depth(val_) - +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< int,std::allocator< int > >()); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_1(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< int,std::allocator< int > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); } -#define cmf_river_Reach_length_get(self_) self_->get_length() - + #define SWIG_From_double PyFloat_FromDouble -#define cmf_river_Reach_width_get(self_) self_->get_width() - -#define cmf_river_Reach_channel_get(self_) &self_->get_height_function() - +namespace swig { + template <> struct traits< double > { + typedef value_category category; + static const char* type_name() { return"double"; } + }; + template <> struct traits_asval< double > { + typedef double value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_double (obj, val); + } + }; + template <> struct traits_from< double > { + typedef double value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_double (val); + } + }; +} -#define cmf_river_Reach_upstream_count_get(self_) self_->upstream_count() - -#define cmf_river_Reach_diffusive_get(self_) self_->get_diffusive() -#define cmf_river_Reach_diffusive_set(self_, val_) self_->set_diffusive(val_) - + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "double" "," "std::allocator< double >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){ + return self->size(); + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< double,std::allocator< double > >()); + } +SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_1(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< double,std::allocator< double > >::difference_type id = i; + std::vector< double,std::allocator< double > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< double,std::allocator< double > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_1(std::vector< double > *self,std::vector< double >::iterator first,std::vector< double >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__insert__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_double_Sg__insert__SWIG_1(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::size_type n,std::vector< double >::value_type const &x){ self->insert(pos, n, x); } -#define cmf_river_ReachIterator_position_get(self_) self_->position() - +namespace swig { + template <> struct traits< size_t > { + typedef value_category category; + static const char* type_name() { return"size_t"; } + }; + template <> struct traits_asval< size_t > { + typedef size_t value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_size_t (obj, val); + } + }; + template <> struct traits_from< size_t > { + typedef size_t value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_size_t (val); + } + }; +} -#define cmf_upslope_SurfaceWater_puddledepth_get(self_) self_->get_puddledepth() -#define cmf_upslope_SurfaceWater_puddledepth_set(self_, val_) self_->set_puddledepth(val_) - -#define cmf_upslope_SurfaceWater_nManning_get(self_) self_->get_nManning() -#define cmf_upslope_SurfaceWater_nManning_set(self_, val_) self_->set_nManning(val_) - + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "size_t" "," "std::allocator< size_t >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_size_t_Sg__iterator(std::vector< size_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_size_t_Sg____nonzero__(std::vector< size_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_size_t_Sg____bool__(std::vector< size_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< size_t >::size_type std_vector_Sl_size_t_Sg____len__(std::vector< size_t > const *self){ + return self->size(); + } +SWIGINTERN std::vector< size_t,std::allocator< size_t > > *std_vector_Sl_size_t_Sg____getslice__(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____setslice____SWIG_0(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< size_t,std::allocator< size_t > >()); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____setslice____SWIG_1(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j,std::vector< size_t,std::allocator< size_t > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____delslice__(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____delitem____SWIG_0(std::vector< size_t > *self,std::vector< size_t >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< size_t,std::allocator< size_t > > *std_vector_Sl_size_t_Sg____getitem____SWIG_0(std::vector< size_t > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< size_t,std::allocator< size_t > >::difference_type id = i; + std::vector< size_t,std::allocator< size_t > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____setitem____SWIG_0(std::vector< size_t > *self,PySliceObject *slice,std::vector< size_t,std::allocator< size_t > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< size_t,std::allocator< size_t > >::difference_type id = i; + std::vector< size_t,std::allocator< size_t > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____setitem____SWIG_1(std::vector< size_t > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< size_t,std::allocator< size_t > >::difference_type id = i; + std::vector< size_t,std::allocator< size_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____delitem____SWIG_1(std::vector< size_t > *self,PySliceObject *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< size_t,std::allocator< size_t > >::difference_type id = i; + std::vector< size_t,std::allocator< size_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< size_t >::value_type const &std_vector_Sl_size_t_Sg____getitem____SWIG_1(std::vector< size_t > const *self,std::vector< size_t >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_size_t_Sg____setitem____SWIG_2(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< size_t >::value_type std_vector_Sl_size_t_Sg__pop(std::vector< size_t > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< size_t,std::allocator< size_t > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_size_t_Sg__append(std::vector< size_t > *self,std::vector< size_t >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< size_t >::iterator std_vector_Sl_size_t_Sg__erase__SWIG_0(std::vector< size_t > *self,std::vector< size_t >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< size_t >::iterator std_vector_Sl_size_t_Sg__erase__SWIG_1(std::vector< size_t > *self,std::vector< size_t >::iterator first,std::vector< size_t >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< size_t >::iterator std_vector_Sl_size_t_Sg__insert__SWIG_0(std::vector< size_t > *self,std::vector< size_t >::iterator pos,std::vector< size_t >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_size_t_Sg__insert__SWIG_1(std::vector< size_t > *self,std::vector< size_t >::iterator pos,std::vector< size_t >::size_type n,std::vector< size_t >::value_type const &x){ self->insert(pos, n, x); } - #include "upslope/groundwater.h" - #include "upslope/connections/subsurfacefluxes.h" - #include "upslope/connections/surfacefluxes.h" - #include "upslope/connections/AtmosphericFluxes.h" - #include "upslope/connections/infiltration.h" - #include "upslope/connections/Percolation.h" - #include "upslope/vegetation/ET.h" - #include "upslope/vegetation/ShuttleworthWallace.h" - // Include river model - #include "reach/ManningConnection.h" + #include "cmfmemory.h" -#define cmf_upslope_aquifer_base_height_get(self_) self_->get_base_height() - +// ********************************************************************************************** +// %iterable_to_list(LISTTYPE,ITEMTYPE) typemap system. Puts a function template into the header for general usage +// Function to convert an iterable to a list type (class with append function). For use in typemaps + template + int iterable_to_list(PyObject* iterable,swig_type_info* _item_descriptor, _Ty& temp_list) { + PyObject* iter = PyObject_GetIter(iterable); + if (iter == 0) { + // no iterator + return SWIG_ERROR; + } + while (PyObject* py_item = PyIter_Next(iter)) { + _item_type* item=0; + // if the item is a node, append to node_list + int is_ok = SWIG_ConvertPtr(py_item, (void**)&item, _item_descriptor, SWIG_POINTER_EXCEPTION); + if (is_ok == 0 && item != 0 ) { + temp_list.append(*item); + } + Py_DECREF(py_item); + } + Py_DECREF(iter); + return SWIG_OK; + } + + int is_listtype_or_iterable(PyObject* input, swig_type_info* listtype_descriptor) { + // Checks if a type has the given descriptor or is iterable + void * pt; + int res=SWIG_ConvertPtr(input,&pt,listtype_descriptor,0); + if (SWIG_IsOK(res)) { + return 1; + } else { + PyObject* iter = PyObject_GetIter(input); + if (iter != 0) { + Py_DECREF(iter); + return 2; + } + else return 0; + } + } -#define cmf_upslope_aquifer_top_height_get(self_) self_->get_top_height() - - #include "project.h" +std::string pyrepr(PyObject* o) { + PyObject* s = PyObject_Repr(o); + #if PY_MAJOR_VERSION < 3 + std::string res = PyString_AsString(s); + #else + std::string res = PyUnicode_AsUTF8(s); + #endif + Py_XDECREF(s); + return res; +} -#define cmf_project_cells_get(self_) &self_->get_cells() - + +// numpy/arrayobject.h requires this Macro-constant. Some Compilers (e.g. gcc) defines it internally, others (e.g. VS2008) not +#ifndef SIZEOF_LONG_DOUBLE +#define SIZEOF_LONG_DOUBLE sizeof(long double) +#endif +#ifndef NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#endif + +// including numpy array definition +#include +// including my array header +#include "math/num_array.h" + + +#ifndef NPY_ARRAY_CARRAY +#define NPY_ARRAY_CARRAY NPY_CARRAY +#endif + +#ifndef NPY_ARRAY_OWNDATA +#define NPY_ARRAY_OWNDATA NPY_OWNDATA +#endif + +bool test_npy_array(PyObject* op) { + PyObject* ao = PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); + if (!ao) // If given object was not convertable into an array + return false; + else { + Py_DECREF(ao); + return true; + } +} +// This function creates a numpy array from an num_array. +// The data of the num_array is afterwards owned by the numpy array. +PyObject* as_npy_array(cmf::math::num_array& a) +{ + // Size of the 1d array + npy_intp dims[1] = {a.size()}; + // pointer to the data of the 1d array + cmf::math::num_array::iterator start = a.release(); + // Creates the numpy array using size, place and type information + int flags = NPY_ARRAY_CARRAY | NPY_ARRAY_OWNDATA; + return PyArray_New( + &PyArray_Type,1,dims,NPY_DOUBLE,0, + (void *)start,0,flags,0); +} +// This function creates a new array from any object providing the array interface or from a sequence. +// First a numpy array is created to ensure right ordering, secondly an array is created by copying the given data. +ptrdiff_t from_npy_array(PyObject* op,double ** data) { + // Create a contiguous and behaved numpy array from the given object + // May include a copy of the data + // Returns NULL if: + // - given object was not a sequence of numbers or an object exposing the array interface or + // - array had more dimensions + PyArrayObject* ao = (PyArrayObject*)PyArray_ContiguousFromAny(op,NPY_DOUBLE,1,1); + if (!ao) {// If given object was not convertable into an array (no sequence of numbers or implementation of the array interface) + return 0; + } else { + // Get pointer to data + double * p_array=(double*)PyArray_DATA(ao); + // Get size + ptrdiff_t size = (ptrdiff_t)PyArray_DIM(ao,0); + double * res=new double[size]; + for (ptrdiff_t i=0;i3) { + std::string res = "Sequence <"; + res+=pyrepr(input); + res+="> has to many items (more than 3) to convert to cmf.point."; + return res; + } + + for (int i=0;idays; + ms+=delta->seconds; + ms*=1000; + ms+=delta->microseconds/1000; + return cmf::math::timespan(ms); + } else { + return cmf::math::never; + } + +} +static bool check_time(PyObject* dt) { + void * pT = 0; + int res=SWIG_ConvertPtr(dt,&pT,SWIGTYPE_p_cmf__math__Time,0); + if (SWIG_IsOK(res) && pT!=0) return true; + else if (PyDateTime_Check(dt)) return true; + else if (PyDelta_Check(dt)) return true; + else if (PyDate_Check(dt)) return true; + else return false; +} + + + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#else +#if PY_VERSION_HEX >= 0x03010000 + return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); +#else + return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#endif +#endif +#else + return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; +#if PY_VERSION_HEX>=0x03000000 +#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if(alloc) *alloc = SWIG_NEWOBJ; +#endif + PyBytes_AsStringAndSize(obj, &cstr, &len); +#else + PyString_AsStringAndSize(obj, &cstr, &len); +#endif + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. + + The default behavior is just to return the pointer value, + so, be careful. + */ +#if defined(SWIG_PYTHON_SAFE_CSTRINGS) + if (*alloc != SWIG_OLDOBJ) +#else + if (*alloc == SWIG_NEWOBJ) +#endif + { + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + *cptr = PyBytes_AsString(obj); +#else + assert(0); /* Should never reach here with Unicode strings in Python 3 */ +#endif +#else + *cptr = SWIG_Python_str_AsChar(obj); +#endif + } + } + if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + Py_XDECREF(obj); +#endif + return SWIG_OK; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + } + if (psize) *psize = len + 1; + + Py_XDECREF(obj); + return SWIG_OK; + } else { + Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsCharArray(PyObject * obj, char *val, size_t size) +{ + char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; + int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); + if (SWIG_IsOK(res)) { + /* special case of single char conversion when we don't need space for NUL */ + if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; + if (csize <= size) { + if (val) { + if (csize) memcpy(val, cptr, csize*sizeof(char)); + if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); + } + if (alloc == SWIG_NEWOBJ) { + delete[] cptr; + res = SWIG_DelNewMask(res); + } + return res; + } + if (alloc == SWIG_NEWOBJ) delete[] cptr; + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_char (PyObject * obj, char *val) +{ + int res = SWIG_AsCharArray(obj, val, 1); + if (!SWIG_IsOK(res)) { + long v; + res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); + if (SWIG_IsOK(res)) { + if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { + if (val) *val = static_cast< char >(v); + } else { + res = SWIG_OverflowError; + } + } + } + return res; +} + + +#define cmf_math_timeseries_begin_get(self_) new cmf::math::Time(self_->begin()) + + +#define cmf_math_timeseries_step_get(self_) new cmf::math::Time(self_->step()) + + +#define cmf_math_timeseries_end_get(self_) new cmf::math::Time(self_->end()) + + +SWIGINTERN int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + +SWIGINTERN ptrdiff_t cmf_math_timeseries___len__(cmf::math::timeseries *self){ + return self->size(); + } #include "math/statevariable.h" -#include "math/integrators/integrator.h" -#include "math/integrators/bdf2.h" -#include "math/integrators/explicit_euler.h" -#include "math/integrators/implicit_euler.h" -#include "math/integrators/RKFintegrator.h" -#include "math/integrators/cvodeintegrator.h" -#include "math/integrators/multiintegrator.h" -#include "math/integrators/WaterSoluteIntegrator.h" -#define cmf_math_CVodeIntegrator_order_get(self_) self_->get_order() +#define cmf_math_StateVariable_state_get(self_) self_->get_state() +#define cmf_math_StateVariable_state_set(self_, val_) self_->set_state(val_) -SWIGINTERN size_t cmf_math_Integrator___len__(cmf::math::Integrator *self){ +SWIGINTERN size_t cmf_math_integratable_list___len__(cmf::math::integratable_list const *self){ + return self->size(); + } +SWIGINTERN size_t cmf_math_StateVariableList___len__(cmf::math::StateVariableList const *self){ return self->size(); } -#ifdef __cplusplus -extern "C" { -#endif + + // Include Water + #include "water/Solute.h" + #include "water/SoluteStorage.h" + #include "water/WaterStorage.h" + #include "water/flux_connection.h" + #include "water/boundary_condition.h" + #include "water/simple_connections.h" + #include "water/system_bridge.h" + +SWIGINTERN std::string cmf_water_solute___repr__(cmf::water::solute *self){ return "[" + self->Name + "]"; } +SWIGINTERN cmf::water::solute *cmf_water_solute_vector___getitem__(cmf::water::solute_vector *self,int i){ + return self->get_solute(i); + } +SWIGINTERN size_t cmf_water_solute_vector___len__(cmf::water::solute_vector *self){ return self->size();} +SWIGINTERN cmf::math::timeseries &cmf_water_SoluteTimeseries___getitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute){ + return (*self)[solute]; + } +SWIGINTERN void cmf_water_SoluteTimeseries___setitem__(cmf::water::SoluteTimeseries *self,cmf::water::solute const &solute,cmf::math::timeseries concentration){ + (*self)[solute]=concentration; + } +SWIGINTERN size_t cmf_water_SoluteTimeseries___len__(cmf::water::SoluteTimeseries const *self){ + return self->size(); + } + +#define cmf_water_SoluteStorage_conc_get(self_) self_->get_conc() +#define cmf_water_SoluteStorage_conc_set(self_, val_) self_->set_conc(val_) + + +#define cmf_water_flux_node_project_get(self_) &self_->get_project() + + +#define cmf_water_flux_node_potential_get(self_) self_->get_potential() +#define cmf_water_flux_node_potential_set(self_, val_) self_->set_potential(val_) + + +#define cmf_water_flux_node_connections_get(self_) new cmf::water::connection_list(self_->get_connections()) + + +struct SWIG_null_deleter { + void operator() (void const *) const { + } +}; +#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter() +#define SWIG_NO_NULL_DELETER_1 +#define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW +#define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN + + +#define SWIG_NO_NULL_DELETER_SWIG_BUILTIN_INIT + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r; + if (!PyBool_Check(obj)) + return SWIG_ERROR; + r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; +} + +SWIGINTERN size_t cmf_water_connection_list___len__(cmf::water::connection_list const *self){ return self->size();} +SWIGINTERN bool cmf_water_connection_list___contains__(cmf::water::connection_list const *self,cmf::water::flux_connection::ptr const &con){ return self->contains(con);} + +#define cmf_water_WaterStorage_volume_get(self_) self_->get_volume() +#define cmf_water_WaterStorage_volume_set(self_, val_) self_->set_volume(val_) + + +#define cmf_water_WaterStorage_statevariable_get(self_) self_->get_state_variable_content() +#define cmf_water_WaterStorage_statevariable_set(self_, val_) self_->set_state_variable_content(val_) + + +SWIGINTERNINLINE PyObject * +SWIG_From_char (char c) +{ + return SWIG_FromCharPtrAndSize(&c,1); +} + +SWIGINTERN cmf::water::SoluteStorage &cmf_water_WaterStorage___getitem__(cmf::water::WaterStorage *self,cmf::water::solute X){ + return (*self)[X]; + } + +#include "water/collections.h" + + +#define cmf_water_node_list_potentials_get(self_) self_->get_potentials() +#define cmf_water_node_list_potentials_set(self_, val_) self_->set_potentials(val_) + + +#define cmf_water_NeumannBoundary_list_fluxes_get(self_) self_->get_fluxes() +#define cmf_water_NeumannBoundary_list_fluxes_set(self_, val_) self_->set_fluxes(val_) + + + #include "atmosphere/Weather.h" + #include "atmosphere/meteorology.h" + #include "atmosphere/precipitation.h" + +SWIGINTERN double cmf_atmosphere_RainfallStation___call__(cmf::atmosphere::RainfallStation const *self,cmf::math::Time t){ return self->data[t]; } + + #include "upslope/vegetation/StructVegetation.h" + #include "upslope/surfacewater.h" + #include "upslope/cell.h" + #include "upslope/Topology.h" + #include "upslope/algorithm.h" + + +SWIGINTERN std::string cmf_upslope_vegetation_Vegetation___repr__(cmf::upslope::vegetation::Vegetation *self){ + std::stringstream sstr; + sstr << "cmf.vegetation(\n" + << " Height = " << self->Height << " [m]" << std::endl + << " LAI = " << self->LAI << " [m2/m2]" << std::endl + << " albedo = " << self->albedo << " [W/W]" << std::endl + << " CanopyClosure = " << self->CanopyClosure << " [m2/m2]" << std::endl + << " CanopyPARExtinction = " << self->CanopyPARExtinction << std::endl + << " CanopyCapacityPerLAI = " << self->CanopyCapacityPerLAI << " [mm]" << std::endl + << " StomatalResistance = " << self->StomatalResistance << " [s/m]" << std::endl + << " RootDepth = " << self->RootDepth << " [m]" << std::endl + << " fraction_at_rootdepth = " << self->fraction_at_rootdepth << " [-]" << std::endl + << " RootContent = " << self->RootContent << " [kg/m3]" << std::endl + << ")" << std::endl; + return sstr.str(); + } + +#define cmf_upslope_Cell_topology_get(self_) &self_->get_topology() + + +#define cmf_upslope_Cell_meteorology_get(self_) &self_->get_meteorology() +#define cmf_upslope_Cell_meteorology_set(self_, val_) self_->set_meteorology(*val_) + + +#define cmf_upslope_Cell_layers_get(self_) &self_->get_layers() + + +#define cmf_upslope_Cell_project_get(self_) &self_->get_project() + + +#define cmf_upslope_Cell_saturated_depth_get(self_) self_->get_saturated_depth() +#define cmf_upslope_Cell_saturated_depth_set(self_, val_) self_->set_saturated_depth(val_) + + +#define cmf_upslope_Cell_area_get(self_) self_->get_area() + + +#define cmf_upslope_Cell_soildepth_get(self_) self_->get_soildepth() + +SWIGINTERN bool cmf_upslope_neighbor_iterator___eq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)==cmp;} +SWIGINTERN bool cmf_upslope_neighbor_iterator___neq__(cmf::upslope::neighbor_iterator *self,cmf::upslope::neighbor_iterator const &cmp){return (*self)!=cmp;} + +#define cmf_upslope_cell_vector_lowest_get(self_) &self_->get_lowest() + + +#define cmf_upslope_cell_vector_highest_get(self_) &self_->get_highest() + + + // Include Upslope + #include "upslope/Soil/RetentionCurve.h" + #include "upslope/SoilLayer.h" + + +#define cmf_upslope_BrooksCoreyRetentionCurve_b_get(self_) self_->get_b() +#define cmf_upslope_BrooksCoreyRetentionCurve_b_set(self_, val_) self_->set_b(val_) + + +#define cmf_upslope_SoilLayer_gravitational_potential_get(self_) self_->get_gravitational_potential() + + +#define cmf_upslope_SoilLayer_matrix_potential_get(self_) self_->get_matrix_potential() + + +#define cmf_upslope_SoilLayer_wetness_get(self_) self_->get_wetness() +#define cmf_upslope_SoilLayer_wetness_set(self_, val_) self_->set_wetness(val_) + + +#define cmf_upslope_SoilLayer_theta_get(self_) self_->get_theta() +#define cmf_upslope_SoilLayer_theta_set(self_, val_) self_->set_theta(val_) + + +#define cmf_upslope_SoilLayer_K_get(self_) self_->get_K() + + +#define cmf_upslope_SoilLayer_Ksat_get(self_) self_->get_Ksat() + + +#define cmf_upslope_SoilLayer_thickness_get(self_) self_->get_thickness() + + +#define cmf_upslope_SoilLayer_lower_boundary_get(self_) self_->get_lower_boundary() + + +#define cmf_upslope_SoilLayer_upper_boundary_get(self_) self_->get_upper_boundary() + + +#define cmf_upslope_SoilLayer_porosity_get(self_) self_->get_porosity() + + +#define cmf_upslope_SoilLayer_ice_fraction_get(self_) self_->get_ice_fraction() +#define cmf_upslope_SoilLayer_ice_fraction_set(self_, val_) self_->set_ice_fraction(val_) + + +#define cmf_upslope_SoilLayer_rootfraction_get(self_) self_->get_rootfraction() +#define cmf_upslope_SoilLayer_rootfraction_set(self_, val_) self_->set_rootfraction(val_) + + +#define cmf_upslope_layer_list_gravitational_potential_get(self_) self_->get_gravitational_potential() + + +#define cmf_upslope_layer_list_matrix_potential_get(self_) self_->get_matrix_potential() + + +#define cmf_upslope_layer_list_wetness_get(self_) self_->get_wetness() + + +#define cmf_upslope_layer_list_volume_get(self_) self_->get_volume() + + +#define cmf_upslope_layer_list_potential_get(self_) self_->get_potential() + + +#define cmf_upslope_layer_list_K_get(self_) self_->get_K() + + +#define cmf_upslope_layer_list_Ksat_get(self_) self_->get_Ksat() + + +#define cmf_upslope_layer_list_thickness_get(self_) self_->get_thickness() + + +#define cmf_upslope_layer_list_lower_boundary_get(self_) self_->get_lower_boundary() + + +#define cmf_upslope_layer_list_upper_boundary_get(self_) self_->get_upper_boundary() + + +#define cmf_upslope_layer_list_porosity_get(self_) self_->get_porosity() + + +#define cmf_upslope_layer_list_ice_fraction_get(self_) self_->get_ice_fraction() + + +#define cmf_upslope_layer_list_theta_get(self_) self_->get_theta() + + +#define cmf_upslope_layer_list_root_get(self_) self_->get_rootfraction() + +SWIGINTERN cmf::upslope::SoilLayer::ptr cmf_upslope_layer_list___get(cmf::upslope::layer_list *self,int index){ return (*self)[index];} + +#include "upslope/macropore.h" + + +#define cmf_upslope_MacroPore_filled_fraction_get(self_) self_->get_filled_fraction() + + +#define cmf_upslope_MacroPore_K_get(self_) self_->get_K() + + +#define cmf_upslope_MacroPore_capacity_get(self_) self_->get_capacity() + + +#define cmf_upslope_MacroPore_cell_get(self_) self_->get_cell() + + + #include "reach/ReachType.h" + #include "reach/OpenWaterStorage.h" + #include "reach/Reach.h" + #include "reach/cross_section_reach.h" + + +#define cmf_river_OpenWaterStorage_depth_get(self_) self_->get_depth() +#define cmf_river_OpenWaterStorage_depth_set(self_, val_) self_->set_depth(val_) + + +#define cmf_river_Reach_length_get(self_) self_->get_length() + + +#define cmf_river_Reach_width_get(self_) self_->get_width() + + +#define cmf_river_Reach_channel_get(self_) &self_->get_height_function() + + +#define cmf_river_Reach_upstream_count_get(self_) self_->upstream_count() + + +#define cmf_river_Reach_diffusive_get(self_) self_->get_diffusive() +#define cmf_river_Reach_diffusive_set(self_, val_) self_->set_diffusive(val_) + + +#define cmf_river_ReachIterator_position_get(self_) self_->position() + + +#define cmf_upslope_SurfaceWater_puddledepth_get(self_) self_->get_puddledepth() +#define cmf_upslope_SurfaceWater_puddledepth_set(self_, val_) self_->set_puddledepth(val_) + + +#define cmf_upslope_SurfaceWater_nManning_get(self_) self_->get_nManning() +#define cmf_upslope_SurfaceWater_nManning_set(self_, val_) self_->set_nManning(val_) + + + #include "upslope/groundwater.h" + #include "upslope/connections/subsurfacefluxes.h" + #include "upslope/connections/surfacefluxes.h" + #include "upslope/connections/AtmosphericFluxes.h" + #include "upslope/connections/infiltration.h" + #include "upslope/connections/Percolation.h" + #include "upslope/vegetation/ET.h" + #include "upslope/vegetation/ShuttleworthWallace.h" + // Include river model + #include "reach/ManningConnection.h" + + +#define cmf_upslope_aquifer_base_height_get(self_) self_->get_base_height() + + +#define cmf_upslope_aquifer_top_height_get(self_) self_->get_top_height() + + + #include "project.h" + + +#define cmf_project_cells_get(self_) &self_->get_cells() + + +#include "math/statevariable.h" +#include "math/integrators/integrator.h" +#include "math/integrators/bdf2.h" +#include "math/integrators/explicit_euler.h" +#include "math/integrators/implicit_euler.h" +#include "math/integrators/RKFintegrator.h" +#include "math/integrators/cvodeintegrator.h" +#include "math/integrators/multiintegrator.h" +#include "math/integrators/WaterSoluteIntegrator.h" + + +#define cmf_math_CVode_order_get(self_) self_->get_order() + +SWIGINTERN size_t cmf_math_Integrator___len__(cmf::math::Integrator *self){ + return self->size(); + } +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 = (size_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SwigPyIterator_incr",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + } + try { + result = (swig::SwigPyIterator *)(arg1)->incr(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 = (size_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SwigPyIterator_decr",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + } + try { + result = (swig::SwigPyIterator *)(arg1)->decr(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + ptrdiff_t result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator_distance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + try { + result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); + } + catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator_equal",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + try { + result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); + } + catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->next(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->__next__(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->previous(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator_advance",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)(arg1)->advance(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator___eq__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + bool result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator___ne__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator___iadd__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator___isub__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SwigPyIterator___add__",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + ptrdiff_t result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator___sub__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv); + case 2: + return _wrap_SwigPyIterator___sub____SWIG_0(self, argc, argv); + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_vector_int_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "j", NULL + }; + std::vector< int,std::allocator< int > > *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_int___getslice__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_int___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_int___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_int_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int___setslice__",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_int___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n" + " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "j", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_int___delslice__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + try { + std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< int,std::allocator< int > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_int___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_int___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int___delitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_int___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" + " std::vector< int >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + try { + result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_int(static_cast< int >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int___getitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_int___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__getitem__(PySliceObject *)\n" + " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int___setitem__",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_int___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_int___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n" + " std::vector< int >::__setitem__(PySliceObject *)\n" + " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + try { + result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_int_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_append" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< int > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< int > *)new std::vector< int >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< int > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)((std::vector< int > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "v", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_int_swap",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_int_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_int_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + } + arg2 = reinterpret_cast< std::vector< int > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_begin" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_end" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_rend" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< int > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + result = (std::vector< int > *)new std::vector< int >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< int >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< int >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int_erase",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_int_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::erase(std::vector< int >::iterator)\n" + " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_int__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int >::size_type arg1 ; + std::vector< int >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::vector< int > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_int" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vector_int" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_int(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_vector_int",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_int__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_int__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_int__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_int__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_vector_int'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::vector()\n" + " std::vector< int >::vector(std::vector< int > const &)\n" + " std::vector< int >::vector(std::vector< int >::size_type)\n" + " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_int_push_back",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front(); + resultobj = SWIG_From_int(static_cast< int >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back(); + resultobj = SWIG_From_int(static_cast< int >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_int_assign",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int_resize",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_int_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::resize(std::vector< int >::size_type)\n" + " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + std::vector< int >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_int_Sg__insert__SWIG_0(arg1,arg2,(int const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::size_type arg3 ; + std::vector< int >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< int >::value_type temp4 ; + int val4 ; + int ecode4 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_int_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_int_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); + } + arg3 = static_cast< std::vector< int >::size_type >(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vector_int_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); + } + temp4 = static_cast< std::vector< int >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_int_Sg__insert__SWIG_1(arg1,arg2,arg3,(int const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_int_insert",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_int_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_int_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_int_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n" + " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_int_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_int_reserve",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_int_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_int_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_int_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_int" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_int_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_int_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_vector_double_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_iterator" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_double_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___nonzero__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)std_vector_Sl_double_Sg____nonzero__((std::vector< double > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___bool__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)std_vector_Sl_double_Sg____bool__((std::vector< double > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___len__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = std_vector_Sl_double_Sg____len__((std::vector< double > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "j", NULL + }; + std::vector< double,std::allocator< double > > *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_double___getslice__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___getslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___getslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double___getslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + std::vector< double,std::allocator< double > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_double___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_double___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_double_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double___setslice__",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_double___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type)\n" + " std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type,std::vector< double,std::allocator< double > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "j", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_double___delslice__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___delslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___delslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double___delslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'"); + } + arg3 = static_cast< std::vector< double >::difference_type >(val3); + try { + std_vector_Sl_double_Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___delitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + try { + std_vector_Sl_double_Sg____delitem____SWIG_0(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double,std::allocator< double > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___getitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< double,std::allocator< double > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_double___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_double___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double___delitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_double___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__delitem__(std::vector< double >::difference_type)\n" + " std::vector< double >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___getitem__" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___getitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + try { + result = (std::vector< double >::value_type *) &std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_double(static_cast< double >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double___getitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_double___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__getitem__(PySliceObject *)\n" + " std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::difference_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double___setitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'"); + } + arg2 = static_cast< std::vector< double >::difference_type >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double___setitem__" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_double_Sg____setitem____SWIG_2(arg1,arg2,(double const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double___setitem__",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_double___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_double___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n" + " std::vector< double >::__setitem__(PySliceObject *)\n" + " std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_pop" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + try { + result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_double_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_append" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double_append" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_double_Sg__append(arg1,(double const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_double__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< double > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< double > *)new std::vector< double >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_double__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< double > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_double" "', argument " "1"" of type '" "std::vector< double > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_double" "', argument " "1"" of type '" "std::vector< double > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_empty" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (bool)((std::vector< double > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_size" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "v", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_double_swap",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_swap" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_double_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_double_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); + } + arg2 = reinterpret_cast< std::vector< double > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_begin" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_end" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_rbegin" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_rend" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_clear" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< double > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_double__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< double > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_double" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); + } + arg1 = static_cast< std::vector< double >::size_type >(val1); + result = (std::vector< double > *)new std::vector< double >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< double >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + result = std_vector_Sl_double_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< double >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'"); + } + } + result = std_vector_Sl_double_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double_erase",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_double_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::erase(std::vector< double >::iterator)\n" + " std::vector< double >::erase(std::vector< double >::iterator,std::vector< double >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_double__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double >::size_type arg1 ; + std::vector< double >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + std::vector< double > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_double" "', argument " "1"" of type '" "std::vector< double >::size_type""'"); + } + arg1 = static_cast< std::vector< double >::size_type >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vector_double" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_double(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_vector_double",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_double__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_double__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_double__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_double__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_vector_double'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::vector()\n" + " std::vector< double >::vector(std::vector< double > const &)\n" + " std::vector< double >::vector(std::vector< double >::size_type)\n" + " std::vector< double >::vector(std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< double >::value_type temp2 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_double_push_back",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_push_back" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'"); + } + temp2 = static_cast< std::vector< double >::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector< double >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_front" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front(); + resultobj = SWIG_From_double(static_cast< double >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_back" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back(); + resultobj = SWIG_From_double(static_cast< double >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_double_assign",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_assign" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double_resize",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_double_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::resize(std::vector< double >::size_type)\n" + " std::vector< double >::resize(std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< double >::value_type temp3 ; + double val3 ; + int ecode3 = 0 ; + std::vector< double >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double_insert" "', argument " "3"" of type '" "std::vector< double >::value_type""'"); + } + temp3 = static_cast< std::vector< double >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_double_Sg__insert__SWIG_0(arg1,arg2,(double const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::iterator arg2 ; + std::vector< double >::size_type arg3 ; + std::vector< double >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< double >::value_type temp4 ; + double val4 ; + int ecode4 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_double_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_double_insert" "', argument " "3"" of type '" "std::vector< double >::size_type""'"); + } + arg3 = static_cast< std::vector< double >::size_type >(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vector_double_insert" "', argument " "4"" of type '" "std::vector< double >::value_type""'"); + } + temp4 = static_cast< std::vector< double >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_double_Sg__insert__SWIG_1(arg1,arg2,arg3,(double const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_double_insert",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_double_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_double_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_double_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::value_type const &)\n" + " std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::size_type,std::vector< double >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_double_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + std::vector< double >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_double_reserve",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_reserve" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_double_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'"); + } + arg2 = static_cast< std::vector< double >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_double_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< double >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_double_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + result = ((std::vector< double > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< double > *arg1 = (std::vector< double > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_double" "', argument " "1"" of type '" "std::vector< double > *""'"); + } + arg1 = reinterpret_cast< std::vector< double > * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_double_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_double_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_vector_size_t_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_iterator" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_size_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___nonzero__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (bool)std_vector_Sl_size_t_Sg____nonzero__((std::vector< size_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___bool__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (bool)std_vector_Sl_size_t_Sg____bool__((std::vector< size_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___len__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = std_vector_Sl_size_t_Sg____len__((std::vector< size_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + std::vector< size_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "j", NULL + }; + std::vector< size_t,std::allocator< size_t > > *result = 0 ; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_size_t___getslice__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___getslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___getslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t___getslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< size_t >::difference_type >(val3); + try { + result = (std::vector< size_t,std::allocator< size_t > > *)std_vector_Sl_size_t_Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + std::vector< size_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___setslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___setslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t___setslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< size_t >::difference_type >(val3); + try { + std_vector_Sl_size_t_Sg____setslice____SWIG_0(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + std::vector< size_t >::difference_type arg3 ; + std::vector< size_t,std::allocator< size_t > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___setslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___setslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t___setslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< size_t >::difference_type >(val3); + { + std::vector< size_t,std::allocator< size_t > > *ptr = (std::vector< size_t,std::allocator< size_t > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_size_t___setslice__" "', argument " "4"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_size_t___setslice__" "', argument " "4"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_size_t_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< size_t,std::allocator< size_t > > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t___setslice__",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_size_t___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::__setslice__(std::vector< size_t >::difference_type,std::vector< size_t >::difference_type)\n" + " std::vector< size_t >::__setslice__(std::vector< size_t >::difference_type,std::vector< size_t >::difference_type,std::vector< size_t,std::allocator< size_t > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + std::vector< size_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "i",(char *) "j", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_size_t___delslice__",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___delslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___delslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t___delslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< size_t >::difference_type >(val3); + try { + std_vector_Sl_size_t_Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___delitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___delitem__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + try { + std_vector_Sl_size_t_Sg____delitem____SWIG_0(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< size_t,std::allocator< size_t > > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___getitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t___getitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + result = (std::vector< size_t,std::allocator< size_t > > *)std_vector_Sl_size_t_Sg____getitem____SWIG_0(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + std::vector< size_t,std::allocator< size_t > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___setitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + { + std::vector< size_t,std::allocator< size_t > > *ptr = (std::vector< size_t,std::allocator< size_t > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_size_t___setitem__" "', argument " "3"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_size_t___setitem__" "', argument " "3"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_size_t_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< size_t,std::allocator< size_t > > const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___setitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t___setitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_size_t_Sg____setitem____SWIG_1(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + PySliceObject *arg2 = (PySliceObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___delitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t___delitem__" "', argument " "2"" of type '" "PySliceObject *""'"); + } + arg2 = (PySliceObject *) swig_obj[1]; + } + try { + std_vector_Sl_size_t_Sg____delitem____SWIG_1(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t___delitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_size_t___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::__delitem__(std::vector< size_t >::difference_type)\n" + " std::vector< size_t >::__delitem__(PySliceObject *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< size_t >::value_type *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___getitem__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___getitem__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + try { + result = (std::vector< size_t >::value_type *) &std_vector_Sl_size_t_Sg____getitem____SWIG_1((std::vector< size_t > const *)arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_size_t(static_cast< size_t >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t___getitem__",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_size_t___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::__getitem__(PySliceObject *)\n" + " std::vector< size_t >::__getitem__(std::vector< size_t >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::difference_type arg2 ; + std::vector< size_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< size_t >::value_type temp3 ; + size_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t___setitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t___setitem__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< size_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t___setitem__" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'"); + } + temp3 = static_cast< std::vector< size_t >::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_size_t_Sg____setitem____SWIG_2(arg1,arg2,(size_t const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t___setitem__",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_size_t___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_size_t___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::__setitem__(PySliceObject *,std::vector< size_t,std::allocator< size_t > > const &)\n" + " std::vector< size_t >::__setitem__(PySliceObject *)\n" + " std::vector< size_t >::__setitem__(std::vector< size_t >::difference_type,std::vector< size_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::value_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_pop" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + try { + result = std_vector_Sl_size_t_Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< size_t >::value_type temp2 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_size_t_append",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_append" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t_append" "', argument " "2"" of type '" "std::vector< size_t >::value_type""'"); + } + temp2 = static_cast< std::vector< size_t >::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_size_t_Sg__append(arg1,(size_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_size_t__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< size_t > *result = 0 ; + + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< size_t > *)new std::vector< size_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_size_t__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< size_t > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< size_t,std::allocator< size_t > > *ptr = (std::vector< size_t,std::allocator< size_t > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_size_t" "', argument " "1"" of type '" "std::vector< size_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vector_size_t" "', argument " "1"" of type '" "std::vector< size_t > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< size_t > *)new std::vector< size_t >((std::vector< size_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_empty" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (bool)((std::vector< size_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_size" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = ((std::vector< size_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "v", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_size_t_swap",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_swap" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_size_t_swap" "', argument " "2"" of type '" "std::vector< size_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vector_size_t_swap" "', argument " "2"" of type '" "std::vector< size_t > &""'"); + } + arg2 = reinterpret_cast< std::vector< size_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_begin" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_end" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_rbegin" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::reverse_iterator result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_rend" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_clear" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< size_t > > result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_get_allocator" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = ((std::vector< size_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< size_t >::allocator_type(static_cast< const std::vector< size_t >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_size_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_size_t__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< size_t > *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_size_t" "', argument " "1"" of type '" "std::vector< size_t >::size_type""'"); + } + arg1 = static_cast< std::vector< size_t >::size_type >(val1); + result = (std::vector< size_t > *)new std::vector< size_t >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_pop_back" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_resize" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t_resize" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'"); + } + arg2 = static_cast< std::vector< size_t >::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< size_t >::iterator result; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_erase" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } + } + result = std_vector_Sl_size_t_Sg__erase__SWIG_0(arg1,arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::iterator arg2 ; + std::vector< size_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< size_t >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_erase" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_erase" "', argument " "3"" of type '" "std::vector< size_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_erase" "', argument " "3"" of type '" "std::vector< size_t >::iterator""'"); + } + } + result = std_vector_Sl_size_t_Sg__erase__SWIG_1(arg1,arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t_erase",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_size_t_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::erase(std::vector< size_t >::iterator)\n" + " std::vector< size_t >::erase(std::vector< size_t >::iterator,std::vector< size_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_size_t__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t >::size_type arg1 ; + std::vector< size_t >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< size_t >::value_type temp2 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< size_t > *result = 0 ; + + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_size_t" "', argument " "1"" of type '" "std::vector< size_t >::size_type""'"); + } + arg1 = static_cast< std::vector< size_t >::size_type >(val1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vector_size_t" "', argument " "2"" of type '" "std::vector< size_t >::value_type""'"); + } + temp2 = static_cast< std::vector< size_t >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< size_t > *)new std::vector< size_t >(arg1,(std::vector< size_t >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_size_t(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"new_vector_size_t",0,2,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_size_t__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_size_t__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_size_t__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_size_t__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_vector_size_t'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::vector()\n" + " std::vector< size_t >::vector(std::vector< size_t > const &)\n" + " std::vector< size_t >::vector(std::vector< size_t >::size_type)\n" + " std::vector< size_t >::vector(std::vector< size_t >::size_type,std::vector< size_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< size_t >::value_type temp2 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_size_t_push_back",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_push_back" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t_push_back" "', argument " "2"" of type '" "std::vector< size_t >::value_type""'"); + } + temp2 = static_cast< std::vector< size_t >::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector< size_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_front" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (std::vector< size_t >::value_type *) &((std::vector< size_t > const *)arg1)->front(); + resultobj = SWIG_From_size_t(static_cast< size_t >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::value_type *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_back" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = (std::vector< size_t >::value_type *) &((std::vector< size_t > const *)arg1)->back(); + resultobj = SWIG_From_size_t(static_cast< size_t >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::size_type arg2 ; + std::vector< size_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< size_t >::value_type temp3 ; + size_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n",(char *) "x", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:vector_size_t_assign",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_assign" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t_assign" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'"); + } + arg2 = static_cast< std::vector< size_t >::size_type >(val2); + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t_assign" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'"); + } + temp3 = static_cast< std::vector< size_t >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector< size_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::size_type arg2 ; + std::vector< size_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< size_t >::value_type temp3 ; + size_t val3 ; + int ecode3 = 0 ; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_resize" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t_resize" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'"); + } + arg2 = static_cast< std::vector< size_t >::size_type >(val2); + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t_resize" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'"); + } + temp3 = static_cast< std::vector< size_t >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector< size_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t_resize",0,3,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_size_t_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::resize(std::vector< size_t >::size_type)\n" + " std::vector< size_t >::resize(std::vector< size_t >::size_type,std::vector< size_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::iterator arg2 ; + std::vector< size_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< size_t >::value_type temp3 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< size_t >::iterator result; + + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_insert" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t_insert" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'"); + } + temp3 = static_cast< std::vector< size_t >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_size_t_Sg__insert__SWIG_0(arg1,arg2,(size_t const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::iterator arg2 ; + std::vector< size_t >::size_type arg3 ; + std::vector< size_t >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< size_t >::value_type temp4 ; + size_t val4 ; + int ecode4 = 0 ; + + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_insert" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_size_t_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_size_t_insert" "', argument " "3"" of type '" "std::vector< size_t >::size_type""'"); + } + arg3 = static_cast< std::vector< size_t >::size_type >(val3); + ecode4 = SWIG_AsVal_size_t(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vector_size_t_insert" "', argument " "4"" of type '" "std::vector< size_t >::value_type""'"); + } + temp4 = static_cast< std::vector< size_t >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_size_t_Sg__insert__SWIG_1(arg1,arg2,arg3,(size_t const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args,"vector_size_t_insert",0,4,argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_size_t_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_size_t_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'vector_size_t_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< size_t >::insert(std::vector< size_t >::iterator,std::vector< size_t >::value_type const &)\n" + " std::vector< size_t >::insert(std::vector< size_t >::iterator,std::vector< size_t >::size_type,std::vector< size_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + std::vector< size_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:vector_size_t_reserve",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_reserve" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_size_t_reserve" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'"); + } + arg2 = static_cast< std::vector< size_t >::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_size_t_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< size_t >::size_type result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_size_t_capacity" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + result = ((std::vector< size_t > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_size_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_size_t" "', argument " "1"" of type '" "std::vector< size_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< size_t > * >(argp1); + { + try { + delete arg1; + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_size_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_size_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_get_parallel_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; @@ -23688,7 +33066,7 @@ SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_0(PyObject *SWIGUNUSEDPAR cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator > result; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection >,std::allocator< std::shared_ptr< cmf::water::flux_connection > > >::iterator > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); @@ -23706,7 +33084,7 @@ SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_0(PyObject *SWIGUNUSEDPAR } } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -23718,7 +33096,7 @@ SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_0(PyObject *SWIGUNUSEDPARM( cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator > result; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection >,std::allocator< std::shared_ptr< cmf::water::flux_connection > > >::iterator > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); @@ -23736,7 +33114,7 @@ SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_0(PyObject *SWIGUNUSEDPARM( } } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::iterator(static_cast< const cmf::water::connection_list::iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -23748,7 +33126,7 @@ SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_1(PyObject *SWIGUNUSEDPAR cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator > result; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection >,std::allocator< std::shared_ptr< cmf::water::flux_connection > > >::const_iterator > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); @@ -23766,7 +33144,7 @@ SWIGINTERN PyObject *_wrap_connection_list_begin__SWIG_1(PyObject *SWIGUNUSEDPAR } } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -23849,7 +33227,7 @@ SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_1(PyObject *SWIGUNUSEDPARM( cmf::water::connection_list *arg1 = (cmf::water::connection_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator > result; + SwigValueWrapper< std::vector< std::shared_ptr< cmf::water::flux_connection >,std::allocator< std::shared_ptr< cmf::water::flux_connection > > >::const_iterator > result; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__water__connection_list, 0 | 0 ); @@ -23867,7 +33245,7 @@ SWIGINTERN PyObject *_wrap_connection_list_end__SWIG_1(PyObject *SWIGUNUSEDPARM( } } - resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new cmf::water::connection_list::const_iterator(static_cast< const cmf::water::connection_list::const_iterator& >(result))), SWIGTYPE_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32723,87 +42101,189 @@ SWIGINTERN PyObject *_wrap_rH_from_vpd(PyObject *SWIGUNUSEDPARM(self), PyObject } -SWIGINTERN PyObject *_wrap_global_radiation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { +SWIGINTERN PyObject *_wrap_watts_to_MJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "Watts", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:watts_to_MJ",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "watts_to_MJ" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::atmosphere::watts_to_MJ(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MJ_to_watts(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *) "MJ", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MJ_to_watts",kwnames,&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "MJ_to_watts" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (double)cmf::atmosphere::MJ_to_watts(arg1); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_extraterrestrial_radiation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; cmf::math::Time arg1 ; - double arg2 ; - double arg3 ; - double arg4 = (double) 8 ; - double arg5 = (double) 51 ; - double arg6 = (double) 1 ; - bool arg7 = (bool) 0 ; + double arg2 = (double) 8 ; + double arg3 = (double) 51 ; + double arg4 = (double) 1 ; + bool arg5 = (bool) 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; - double val5 ; + bool val5 ; int ecode5 = 0 ; - double val6 ; - int ecode6 = 0 ; - bool val7 ; - int ecode7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; char * kwnames[] = { - (char *) "t",(char *) "height",(char *) "sunshine_fraction",(char *) "longitude",(char *) "latitude",(char *) "time_zone",(char *) "daily", NULL + (char *) "t",(char *) "longitude",(char *) "latitude",(char *) "time_zone",(char *) "daily", NULL }; double result; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:global_radiation",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:extraterrestrial_radiation",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; { arg1 = convert_datetime_to_cmftime(obj0); if (arg1 == cmf::math::never) { SWIG_exception_fail(SWIG_TypeError,"Can't convert input value to cmf.Time object"); } } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "global_radiation" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "global_radiation" "', argument " "3"" of type '" "double""'"); - } - arg3 = static_cast< double >(val3); + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "extraterrestrial_radiation" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "extraterrestrial_radiation" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } if (obj3) { ecode4 = SWIG_AsVal_double(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "global_radiation" "', argument " "4"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "extraterrestrial_radiation" "', argument " "4"" of type '" "double""'"); } arg4 = static_cast< double >(val4); } if (obj4) { - ecode5 = SWIG_AsVal_double(obj4, &val5); + ecode5 = SWIG_AsVal_bool(obj4, &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "global_radiation" "', argument " "5"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "extraterrestrial_radiation" "', argument " "5"" of type '" "bool""'"); } - arg5 = static_cast< double >(val5); + arg5 = static_cast< bool >(val5); } - if (obj5) { - ecode6 = SWIG_AsVal_double(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "global_radiation" "', argument " "6"" of type '" "double""'"); - } - arg6 = static_cast< double >(val6); - } - if (obj6) { - ecode7 = SWIG_AsVal_bool(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "global_radiation" "', argument " "7"" of type '" "bool""'"); - } - arg7 = static_cast< bool >(val7); + { + try { + result = (double)cmf::atmosphere::extraterrestrial_radiation(arg1,arg2,arg3,arg4,arg5); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_global_radiation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "Ra",(char *) "height",(char *) "sunshine_fraction", NULL + }; + double result; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:global_radiation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "global_radiation" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "global_radiation" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "global_radiation" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); { try { - result = (double)cmf::atmosphere::global_radiation(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + result = (double)cmf::atmosphere::global_radiation(arg1,arg2,arg3); } catch (const std::out_of_range& e) { SWIG_exception(SWIG_IndexError, e.what()); } catch (const std::exception& e) { @@ -33320,6 +42800,58 @@ SWIGINTERN PyObject *_wrap_Weather_Rs_get(PyObject *SWIGUNUSEDPARM(self), PyObje } +SWIGINTERN PyObject *_wrap_Weather_Ra_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + if (!SWIG_Python_UnpackTuple(args,"Weather_Ra_set",2,2,swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Ra_set" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weather_Ra_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->Ra = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Weather_Ra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__atmosphere__Weather, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weather_Ra_get" "', argument " "1"" of type '" "cmf::atmosphere::Weather *""'"); + } + arg1 = reinterpret_cast< cmf::atmosphere::Weather * >(argp1); + result = (double) ((arg1)->Ra); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Weather_daylength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cmf::atmosphere::Weather *arg1 = (cmf::atmosphere::Weather *) 0 ; @@ -33487,7 +43019,8 @@ SWIGINTERN PyObject *_wrap_new_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject double arg5 = (double) 2.0 ; double arg6 = (double) 0.5 ; double arg7 = (double) 15 ; - double arg8 = (double) 12 ; + double arg8 = (double) 30 ; + double arg9 = (double) 12 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -33504,6 +43037,8 @@ SWIGINTERN PyObject *_wrap_new_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; + double val9 ; + int ecode9 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -33512,12 +43047,13 @@ SWIGINTERN PyObject *_wrap_new_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; char * kwnames[] = { - (char *) "T",(char *) "Tmax",(char *) "Tmin",(char *) "rH",(char *) "wind",(char *) "sunshine",(char *) "Rs",(char *) "daylength", NULL + (char *) "T",(char *) "Tmax",(char *) "Tmin",(char *) "rH",(char *) "wind",(char *) "sunshine",(char *) "Rs",(char *) "Ra",(char *) "daylength", NULL }; cmf::atmosphere::Weather *result = 0 ; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOO:new_Weather",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOOOOOO:new_Weather",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; if (obj0) { ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { @@ -33574,9 +43110,16 @@ SWIGINTERN PyObject *_wrap_new_Weather(PyObject *SWIGUNUSEDPARM(self), PyObject } arg8 = static_cast< double >(val8); } + if (obj8) { + ecode9 = SWIG_AsVal_double(obj8, &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_Weather" "', argument " "9"" of type '" "double""'"); + } + arg9 = static_cast< double >(val9); + } { try { - result = (cmf::atmosphere::Weather *)new cmf::atmosphere::Weather(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + result = (cmf::atmosphere::Weather *)new cmf::atmosphere::Weather(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); } catch (const std::out_of_range& e) { SWIG_exception(SWIG_IndexError, e.what()); } catch (const std::exception& e) { @@ -75099,6 +84642,38 @@ SWIGINTERN PyObject *_wrap_CVodeIntegrator_max_step_get(PyObject *SWIGUNUSEDPARM } +SWIGINTERN PyObject *_wrap_CVodeIntegrator_get_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_get_order" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator const *""'"); + } + arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); + { + try { + result = (int)((cmf::math::CVodeIntegrator const *)arg1)->get_order(); + } catch (const std::out_of_range& e) { + SWIG_exception(SWIG_IndexError, e.what()); + } catch (const std::exception& e) { + SWIG_exception(SWIG_RuntimeError, e.what()); + } + + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_CVodeIntegrator_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; @@ -75583,38 +85158,6 @@ SWIGINTERN PyObject *_wrap_delete_CVodeIntegrator(PyObject *SWIGUNUSEDPARM(self) } -SWIGINTERN PyObject *_wrap_CVodeIntegrator_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - cmf::math::CVodeIntegrator *arg1 = (cmf::math::CVodeIntegrator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - int result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_cmf__math__CVodeIntegrator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CVodeIntegrator_order_get" "', argument " "1"" of type '" "cmf::math::CVodeIntegrator *""'"); - } - arg1 = reinterpret_cast< cmf::math::CVodeIntegrator * >(argp1); - { - try { - result = (int)cmf_math_CVodeIntegrator_order_get(arg1); - } catch (const std::out_of_range& e) { - SWIG_exception(SWIG_IndexError, e.what()); - } catch (const std::exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *CVodeIntegrator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char *)"swigregister", 1, 1,&obj)) return NULL; @@ -76144,6 +85687,213 @@ SWIGINTERN PyObject *SoluteWaterIntegrator_swiginit(PyObject *SWIGUNUSEDPARM(sel static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, + { (char *)"delete_SwigPyIterator", (PyCFunction)_wrap_delete_SwigPyIterator, METH_O, (char *)"delete_SwigPyIterator(SwigPyIterator self)"}, + { (char *)"SwigPyIterator_value", (PyCFunction)_wrap_SwigPyIterator_value, METH_O, (char *)"SwigPyIterator_value(SwigPyIterator self) -> PyObject *"}, + { (char *)"SwigPyIterator_incr", (PyCFunction) _wrap_SwigPyIterator_incr, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator_incr(SwigPyIterator self, size_t n=1) -> SwigPyIterator"}, + { (char *)"SwigPyIterator_decr", (PyCFunction) _wrap_SwigPyIterator_decr, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator_decr(SwigPyIterator self, size_t n=1) -> SwigPyIterator"}, + { (char *)"SwigPyIterator_distance", (PyCFunction) _wrap_SwigPyIterator_distance, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator_distance(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t"}, + { (char *)"SwigPyIterator_equal", (PyCFunction) _wrap_SwigPyIterator_equal, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator_equal(SwigPyIterator self, SwigPyIterator x) -> bool"}, + { (char *)"SwigPyIterator_copy", (PyCFunction)_wrap_SwigPyIterator_copy, METH_O, (char *)"SwigPyIterator_copy(SwigPyIterator self) -> SwigPyIterator"}, + { (char *)"SwigPyIterator_next", (PyCFunction)_wrap_SwigPyIterator_next, METH_O, (char *)"SwigPyIterator_next(SwigPyIterator self) -> PyObject *"}, + { (char *)"SwigPyIterator___next__", (PyCFunction)_wrap_SwigPyIterator___next__, METH_O, (char *)"SwigPyIterator___next__(SwigPyIterator self) -> PyObject *"}, + { (char *)"SwigPyIterator_previous", (PyCFunction)_wrap_SwigPyIterator_previous, METH_O, (char *)"SwigPyIterator_previous(SwigPyIterator self) -> PyObject *"}, + { (char *)"SwigPyIterator_advance", (PyCFunction) _wrap_SwigPyIterator_advance, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator_advance(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"}, + { (char *)"SwigPyIterator___eq__", (PyCFunction) _wrap_SwigPyIterator___eq__, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator___eq__(SwigPyIterator self, SwigPyIterator x) -> bool"}, + { (char *)"SwigPyIterator___ne__", (PyCFunction) _wrap_SwigPyIterator___ne__, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator___ne__(SwigPyIterator self, SwigPyIterator x) -> bool"}, + { (char *)"SwigPyIterator___iadd__", (PyCFunction) _wrap_SwigPyIterator___iadd__, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator___iadd__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"}, + { (char *)"SwigPyIterator___isub__", (PyCFunction) _wrap_SwigPyIterator___isub__, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator___isub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"}, + { (char *)"SwigPyIterator___add__", (PyCFunction) _wrap_SwigPyIterator___add__, METH_VARARGS | METH_KEYWORDS, (char *)"SwigPyIterator___add__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"}, + { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, (char *)"\n" + "__sub__(ptrdiff_t n) -> SwigPyIterator\n" + "SwigPyIterator___sub__(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t\n" + ""}, + { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"vector_int_iterator", (PyCFunction)_wrap_vector_int_iterator, METH_O, (char *)"vector_int_iterator(vector_int self) -> SwigPyIterator"}, + { (char *)"vector_int___nonzero__", (PyCFunction)_wrap_vector_int___nonzero__, METH_O, (char *)"vector_int___nonzero__(vector_int self) -> bool"}, + { (char *)"vector_int___bool__", (PyCFunction)_wrap_vector_int___bool__, METH_O, (char *)"vector_int___bool__(vector_int self) -> bool"}, + { (char *)"vector_int___len__", (PyCFunction)_wrap_vector_int___len__, METH_O, (char *)"vector_int___len__(vector_int self) -> std::vector< int >::size_type"}, + { (char *)"vector_int___getslice__", (PyCFunction) _wrap_vector_int___getslice__, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int___getslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j) -> vector_int"}, + { (char *)"vector_int___setslice__", _wrap_vector_int___setslice__, METH_VARARGS, (char *)"\n" + "__setslice__(std::vector< int >::difference_type i, std::vector< int >::difference_type j)\n" + "vector_int___setslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j, vector_int v)\n" + ""}, + { (char *)"vector_int___delslice__", (PyCFunction) _wrap_vector_int___delslice__, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int___delslice__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)"}, + { (char *)"vector_int___delitem__", _wrap_vector_int___delitem__, METH_VARARGS, (char *)"\n" + "__delitem__(std::vector< int >::difference_type i)\n" + "vector_int___delitem__(vector_int self, PySliceObject * slice)\n" + ""}, + { (char *)"vector_int___getitem__", _wrap_vector_int___getitem__, METH_VARARGS, (char *)"\n" + "__getitem__(PySliceObject * slice) -> vector_int\n" + "vector_int___getitem__(vector_int self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const &\n" + ""}, + { (char *)"vector_int___setitem__", _wrap_vector_int___setitem__, METH_VARARGS, (char *)"\n" + "__setitem__(PySliceObject * slice, vector_int v)\n" + "__setitem__(PySliceObject * slice)\n" + "vector_int___setitem__(vector_int self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x)\n" + ""}, + { (char *)"vector_int_pop", (PyCFunction)_wrap_vector_int_pop, METH_O, (char *)"vector_int_pop(vector_int self) -> std::vector< int >::value_type"}, + { (char *)"vector_int_append", (PyCFunction) _wrap_vector_int_append, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int_append(vector_int self, std::vector< int >::value_type const & x)"}, + { (char *)"vector_int_empty", (PyCFunction)_wrap_vector_int_empty, METH_O, (char *)"vector_int_empty(vector_int self) -> bool"}, + { (char *)"vector_int_size", (PyCFunction)_wrap_vector_int_size, METH_O, (char *)"vector_int_size(vector_int self) -> std::vector< int >::size_type"}, + { (char *)"vector_int_swap", (PyCFunction) _wrap_vector_int_swap, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int_swap(vector_int self, vector_int v)"}, + { (char *)"vector_int_begin", (PyCFunction)_wrap_vector_int_begin, METH_O, (char *)"vector_int_begin(vector_int self) -> std::vector< int >::iterator"}, + { (char *)"vector_int_end", (PyCFunction)_wrap_vector_int_end, METH_O, (char *)"vector_int_end(vector_int self) -> std::vector< int >::iterator"}, + { (char *)"vector_int_rbegin", (PyCFunction)_wrap_vector_int_rbegin, METH_O, (char *)"vector_int_rbegin(vector_int self) -> std::vector< int >::reverse_iterator"}, + { (char *)"vector_int_rend", (PyCFunction)_wrap_vector_int_rend, METH_O, (char *)"vector_int_rend(vector_int self) -> std::vector< int >::reverse_iterator"}, + { (char *)"vector_int_clear", (PyCFunction)_wrap_vector_int_clear, METH_O, (char *)"vector_int_clear(vector_int self)"}, + { (char *)"vector_int_get_allocator", (PyCFunction)_wrap_vector_int_get_allocator, METH_O, (char *)"vector_int_get_allocator(vector_int self) -> std::vector< int >::allocator_type"}, + { (char *)"vector_int_pop_back", (PyCFunction)_wrap_vector_int_pop_back, METH_O, (char *)"vector_int_pop_back(vector_int self)"}, + { (char *)"vector_int_erase", _wrap_vector_int_erase, METH_VARARGS, (char *)"\n" + "erase(std::vector< int >::iterator pos) -> std::vector< int >::iterator\n" + "vector_int_erase(vector_int self, std::vector< int >::iterator first, std::vector< int >::iterator last) -> std::vector< int >::iterator\n" + ""}, + { (char *)"new_vector_int", _wrap_new_vector_int, METH_VARARGS, (char *)"\n" + "vector_int()\n" + "vector_int(vector_int arg2)\n" + "vector_int(std::vector< int >::size_type size)\n" + "new_vector_int(std::vector< int >::size_type size, std::vector< int >::value_type const & value) -> vector_int\n" + ""}, + { (char *)"vector_int_push_back", (PyCFunction) _wrap_vector_int_push_back, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int_push_back(vector_int self, std::vector< int >::value_type const & x)"}, + { (char *)"vector_int_front", (PyCFunction)_wrap_vector_int_front, METH_O, (char *)"vector_int_front(vector_int self) -> std::vector< int >::value_type const &"}, + { (char *)"vector_int_back", (PyCFunction)_wrap_vector_int_back, METH_O, (char *)"vector_int_back(vector_int self) -> std::vector< int >::value_type const &"}, + { (char *)"vector_int_assign", (PyCFunction) _wrap_vector_int_assign, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int_assign(vector_int self, std::vector< int >::size_type n, std::vector< int >::value_type const & x)"}, + { (char *)"vector_int_resize", _wrap_vector_int_resize, METH_VARARGS, (char *)"\n" + "resize(std::vector< int >::size_type new_size)\n" + "vector_int_resize(vector_int self, std::vector< int >::size_type new_size, std::vector< int >::value_type const & x)\n" + ""}, + { (char *)"vector_int_insert", _wrap_vector_int_insert, METH_VARARGS, (char *)"\n" + "insert(std::vector< int >::iterator pos, std::vector< int >::value_type const & x) -> std::vector< int >::iterator\n" + "vector_int_insert(vector_int self, std::vector< int >::iterator pos, std::vector< int >::size_type n, std::vector< int >::value_type const & x)\n" + ""}, + { (char *)"vector_int_reserve", (PyCFunction) _wrap_vector_int_reserve, METH_VARARGS | METH_KEYWORDS, (char *)"vector_int_reserve(vector_int self, std::vector< int >::size_type n)"}, + { (char *)"vector_int_capacity", (PyCFunction)_wrap_vector_int_capacity, METH_O, (char *)"vector_int_capacity(vector_int self) -> std::vector< int >::size_type"}, + { (char *)"delete_vector_int", (PyCFunction)_wrap_delete_vector_int, METH_O, (char *)"delete_vector_int(vector_int self)"}, + { (char *)"vector_int_swigregister", vector_int_swigregister, METH_VARARGS, NULL}, + { (char *)"vector_int_swiginit", vector_int_swiginit, METH_VARARGS, NULL}, + { (char *)"vector_double_iterator", (PyCFunction)_wrap_vector_double_iterator, METH_O, (char *)"vector_double_iterator(vector_double self) -> SwigPyIterator"}, + { (char *)"vector_double___nonzero__", (PyCFunction)_wrap_vector_double___nonzero__, METH_O, (char *)"vector_double___nonzero__(vector_double self) -> bool"}, + { (char *)"vector_double___bool__", (PyCFunction)_wrap_vector_double___bool__, METH_O, (char *)"vector_double___bool__(vector_double self) -> bool"}, + { (char *)"vector_double___len__", (PyCFunction)_wrap_vector_double___len__, METH_O, (char *)"vector_double___len__(vector_double self) -> std::vector< double >::size_type"}, + { (char *)"vector_double___getslice__", (PyCFunction) _wrap_vector_double___getslice__, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double___getslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j) -> vector_double"}, + { (char *)"vector_double___setslice__", _wrap_vector_double___setslice__, METH_VARARGS, (char *)"\n" + "__setslice__(std::vector< double >::difference_type i, std::vector< double >::difference_type j)\n" + "vector_double___setslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j, vector_double v)\n" + ""}, + { (char *)"vector_double___delslice__", (PyCFunction) _wrap_vector_double___delslice__, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double___delslice__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)"}, + { (char *)"vector_double___delitem__", _wrap_vector_double___delitem__, METH_VARARGS, (char *)"\n" + "__delitem__(std::vector< double >::difference_type i)\n" + "vector_double___delitem__(vector_double self, PySliceObject * slice)\n" + ""}, + { (char *)"vector_double___getitem__", _wrap_vector_double___getitem__, METH_VARARGS, (char *)"\n" + "__getitem__(PySliceObject * slice) -> vector_double\n" + "vector_double___getitem__(vector_double self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const &\n" + ""}, + { (char *)"vector_double___setitem__", _wrap_vector_double___setitem__, METH_VARARGS, (char *)"\n" + "__setitem__(PySliceObject * slice, vector_double v)\n" + "__setitem__(PySliceObject * slice)\n" + "vector_double___setitem__(vector_double self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x)\n" + ""}, + { (char *)"vector_double_pop", (PyCFunction)_wrap_vector_double_pop, METH_O, (char *)"vector_double_pop(vector_double self) -> std::vector< double >::value_type"}, + { (char *)"vector_double_append", (PyCFunction) _wrap_vector_double_append, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double_append(vector_double self, std::vector< double >::value_type const & x)"}, + { (char *)"vector_double_empty", (PyCFunction)_wrap_vector_double_empty, METH_O, (char *)"vector_double_empty(vector_double self) -> bool"}, + { (char *)"vector_double_size", (PyCFunction)_wrap_vector_double_size, METH_O, (char *)"vector_double_size(vector_double self) -> std::vector< double >::size_type"}, + { (char *)"vector_double_swap", (PyCFunction) _wrap_vector_double_swap, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double_swap(vector_double self, vector_double v)"}, + { (char *)"vector_double_begin", (PyCFunction)_wrap_vector_double_begin, METH_O, (char *)"vector_double_begin(vector_double self) -> std::vector< double >::iterator"}, + { (char *)"vector_double_end", (PyCFunction)_wrap_vector_double_end, METH_O, (char *)"vector_double_end(vector_double self) -> std::vector< double >::iterator"}, + { (char *)"vector_double_rbegin", (PyCFunction)_wrap_vector_double_rbegin, METH_O, (char *)"vector_double_rbegin(vector_double self) -> std::vector< double >::reverse_iterator"}, + { (char *)"vector_double_rend", (PyCFunction)_wrap_vector_double_rend, METH_O, (char *)"vector_double_rend(vector_double self) -> std::vector< double >::reverse_iterator"}, + { (char *)"vector_double_clear", (PyCFunction)_wrap_vector_double_clear, METH_O, (char *)"vector_double_clear(vector_double self)"}, + { (char *)"vector_double_get_allocator", (PyCFunction)_wrap_vector_double_get_allocator, METH_O, (char *)"vector_double_get_allocator(vector_double self) -> std::vector< double >::allocator_type"}, + { (char *)"vector_double_pop_back", (PyCFunction)_wrap_vector_double_pop_back, METH_O, (char *)"vector_double_pop_back(vector_double self)"}, + { (char *)"vector_double_erase", _wrap_vector_double_erase, METH_VARARGS, (char *)"\n" + "erase(std::vector< double >::iterator pos) -> std::vector< double >::iterator\n" + "vector_double_erase(vector_double self, std::vector< double >::iterator first, std::vector< double >::iterator last) -> std::vector< double >::iterator\n" + ""}, + { (char *)"new_vector_double", _wrap_new_vector_double, METH_VARARGS, (char *)"\n" + "vector_double()\n" + "vector_double(vector_double arg2)\n" + "vector_double(std::vector< double >::size_type size)\n" + "new_vector_double(std::vector< double >::size_type size, std::vector< double >::value_type const & value) -> vector_double\n" + ""}, + { (char *)"vector_double_push_back", (PyCFunction) _wrap_vector_double_push_back, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double_push_back(vector_double self, std::vector< double >::value_type const & x)"}, + { (char *)"vector_double_front", (PyCFunction)_wrap_vector_double_front, METH_O, (char *)"vector_double_front(vector_double self) -> std::vector< double >::value_type const &"}, + { (char *)"vector_double_back", (PyCFunction)_wrap_vector_double_back, METH_O, (char *)"vector_double_back(vector_double self) -> std::vector< double >::value_type const &"}, + { (char *)"vector_double_assign", (PyCFunction) _wrap_vector_double_assign, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double_assign(vector_double self, std::vector< double >::size_type n, std::vector< double >::value_type const & x)"}, + { (char *)"vector_double_resize", _wrap_vector_double_resize, METH_VARARGS, (char *)"\n" + "resize(std::vector< double >::size_type new_size)\n" + "vector_double_resize(vector_double self, std::vector< double >::size_type new_size, std::vector< double >::value_type const & x)\n" + ""}, + { (char *)"vector_double_insert", _wrap_vector_double_insert, METH_VARARGS, (char *)"\n" + "insert(std::vector< double >::iterator pos, std::vector< double >::value_type const & x) -> std::vector< double >::iterator\n" + "vector_double_insert(vector_double self, std::vector< double >::iterator pos, std::vector< double >::size_type n, std::vector< double >::value_type const & x)\n" + ""}, + { (char *)"vector_double_reserve", (PyCFunction) _wrap_vector_double_reserve, METH_VARARGS | METH_KEYWORDS, (char *)"vector_double_reserve(vector_double self, std::vector< double >::size_type n)"}, + { (char *)"vector_double_capacity", (PyCFunction)_wrap_vector_double_capacity, METH_O, (char *)"vector_double_capacity(vector_double self) -> std::vector< double >::size_type"}, + { (char *)"delete_vector_double", (PyCFunction)_wrap_delete_vector_double, METH_O, (char *)"delete_vector_double(vector_double self)"}, + { (char *)"vector_double_swigregister", vector_double_swigregister, METH_VARARGS, NULL}, + { (char *)"vector_double_swiginit", vector_double_swiginit, METH_VARARGS, NULL}, + { (char *)"vector_size_t_iterator", (PyCFunction)_wrap_vector_size_t_iterator, METH_O, (char *)"vector_size_t_iterator(vector_size_t self) -> SwigPyIterator"}, + { (char *)"vector_size_t___nonzero__", (PyCFunction)_wrap_vector_size_t___nonzero__, METH_O, (char *)"vector_size_t___nonzero__(vector_size_t self) -> bool"}, + { (char *)"vector_size_t___bool__", (PyCFunction)_wrap_vector_size_t___bool__, METH_O, (char *)"vector_size_t___bool__(vector_size_t self) -> bool"}, + { (char *)"vector_size_t___len__", (PyCFunction)_wrap_vector_size_t___len__, METH_O, (char *)"vector_size_t___len__(vector_size_t self) -> std::vector< size_t >::size_type"}, + { (char *)"vector_size_t___getslice__", (PyCFunction) _wrap_vector_size_t___getslice__, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t___getslice__(vector_size_t self, std::vector< size_t >::difference_type i, std::vector< size_t >::difference_type j) -> vector_size_t"}, + { (char *)"vector_size_t___setslice__", _wrap_vector_size_t___setslice__, METH_VARARGS, (char *)"\n" + "__setslice__(std::vector< size_t >::difference_type i, std::vector< size_t >::difference_type j)\n" + "vector_size_t___setslice__(vector_size_t self, std::vector< size_t >::difference_type i, std::vector< size_t >::difference_type j, vector_size_t v)\n" + ""}, + { (char *)"vector_size_t___delslice__", (PyCFunction) _wrap_vector_size_t___delslice__, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t___delslice__(vector_size_t self, std::vector< size_t >::difference_type i, std::vector< size_t >::difference_type j)"}, + { (char *)"vector_size_t___delitem__", _wrap_vector_size_t___delitem__, METH_VARARGS, (char *)"\n" + "__delitem__(std::vector< size_t >::difference_type i)\n" + "vector_size_t___delitem__(vector_size_t self, PySliceObject * slice)\n" + ""}, + { (char *)"vector_size_t___getitem__", _wrap_vector_size_t___getitem__, METH_VARARGS, (char *)"\n" + "__getitem__(PySliceObject * slice) -> vector_size_t\n" + "vector_size_t___getitem__(vector_size_t self, std::vector< size_t >::difference_type i) -> std::vector< size_t >::value_type const &\n" + ""}, + { (char *)"vector_size_t___setitem__", _wrap_vector_size_t___setitem__, METH_VARARGS, (char *)"\n" + "__setitem__(PySliceObject * slice, vector_size_t v)\n" + "__setitem__(PySliceObject * slice)\n" + "vector_size_t___setitem__(vector_size_t self, std::vector< size_t >::difference_type i, std::vector< size_t >::value_type const & x)\n" + ""}, + { (char *)"vector_size_t_pop", (PyCFunction)_wrap_vector_size_t_pop, METH_O, (char *)"vector_size_t_pop(vector_size_t self) -> std::vector< size_t >::value_type"}, + { (char *)"vector_size_t_append", (PyCFunction) _wrap_vector_size_t_append, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t_append(vector_size_t self, std::vector< size_t >::value_type const & x)"}, + { (char *)"vector_size_t_empty", (PyCFunction)_wrap_vector_size_t_empty, METH_O, (char *)"vector_size_t_empty(vector_size_t self) -> bool"}, + { (char *)"vector_size_t_size", (PyCFunction)_wrap_vector_size_t_size, METH_O, (char *)"vector_size_t_size(vector_size_t self) -> std::vector< size_t >::size_type"}, + { (char *)"vector_size_t_swap", (PyCFunction) _wrap_vector_size_t_swap, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t_swap(vector_size_t self, vector_size_t v)"}, + { (char *)"vector_size_t_begin", (PyCFunction)_wrap_vector_size_t_begin, METH_O, (char *)"vector_size_t_begin(vector_size_t self) -> std::vector< size_t >::iterator"}, + { (char *)"vector_size_t_end", (PyCFunction)_wrap_vector_size_t_end, METH_O, (char *)"vector_size_t_end(vector_size_t self) -> std::vector< size_t >::iterator"}, + { (char *)"vector_size_t_rbegin", (PyCFunction)_wrap_vector_size_t_rbegin, METH_O, (char *)"vector_size_t_rbegin(vector_size_t self) -> std::vector< size_t >::reverse_iterator"}, + { (char *)"vector_size_t_rend", (PyCFunction)_wrap_vector_size_t_rend, METH_O, (char *)"vector_size_t_rend(vector_size_t self) -> std::vector< size_t >::reverse_iterator"}, + { (char *)"vector_size_t_clear", (PyCFunction)_wrap_vector_size_t_clear, METH_O, (char *)"vector_size_t_clear(vector_size_t self)"}, + { (char *)"vector_size_t_get_allocator", (PyCFunction)_wrap_vector_size_t_get_allocator, METH_O, (char *)"vector_size_t_get_allocator(vector_size_t self) -> std::vector< size_t >::allocator_type"}, + { (char *)"vector_size_t_pop_back", (PyCFunction)_wrap_vector_size_t_pop_back, METH_O, (char *)"vector_size_t_pop_back(vector_size_t self)"}, + { (char *)"vector_size_t_erase", _wrap_vector_size_t_erase, METH_VARARGS, (char *)"\n" + "erase(std::vector< size_t >::iterator pos) -> std::vector< size_t >::iterator\n" + "vector_size_t_erase(vector_size_t self, std::vector< size_t >::iterator first, std::vector< size_t >::iterator last) -> std::vector< size_t >::iterator\n" + ""}, + { (char *)"new_vector_size_t", _wrap_new_vector_size_t, METH_VARARGS, (char *)"\n" + "vector_size_t()\n" + "vector_size_t(vector_size_t arg2)\n" + "vector_size_t(std::vector< size_t >::size_type size)\n" + "new_vector_size_t(std::vector< size_t >::size_type size, std::vector< size_t >::value_type const & value) -> vector_size_t\n" + ""}, + { (char *)"vector_size_t_push_back", (PyCFunction) _wrap_vector_size_t_push_back, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t_push_back(vector_size_t self, std::vector< size_t >::value_type const & x)"}, + { (char *)"vector_size_t_front", (PyCFunction)_wrap_vector_size_t_front, METH_O, (char *)"vector_size_t_front(vector_size_t self) -> std::vector< size_t >::value_type const &"}, + { (char *)"vector_size_t_back", (PyCFunction)_wrap_vector_size_t_back, METH_O, (char *)"vector_size_t_back(vector_size_t self) -> std::vector< size_t >::value_type const &"}, + { (char *)"vector_size_t_assign", (PyCFunction) _wrap_vector_size_t_assign, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t_assign(vector_size_t self, std::vector< size_t >::size_type n, std::vector< size_t >::value_type const & x)"}, + { (char *)"vector_size_t_resize", _wrap_vector_size_t_resize, METH_VARARGS, (char *)"\n" + "resize(std::vector< size_t >::size_type new_size)\n" + "vector_size_t_resize(vector_size_t self, std::vector< size_t >::size_type new_size, std::vector< size_t >::value_type const & x)\n" + ""}, + { (char *)"vector_size_t_insert", _wrap_vector_size_t_insert, METH_VARARGS, (char *)"\n" + "insert(std::vector< size_t >::iterator pos, std::vector< size_t >::value_type const & x) -> std::vector< size_t >::iterator\n" + "vector_size_t_insert(vector_size_t self, std::vector< size_t >::iterator pos, std::vector< size_t >::size_type n, std::vector< size_t >::value_type const & x)\n" + ""}, + { (char *)"vector_size_t_reserve", (PyCFunction) _wrap_vector_size_t_reserve, METH_VARARGS | METH_KEYWORDS, (char *)"vector_size_t_reserve(vector_size_t self, std::vector< size_t >::size_type n)"}, + { (char *)"vector_size_t_capacity", (PyCFunction)_wrap_vector_size_t_capacity, METH_O, (char *)"vector_size_t_capacity(vector_size_t self) -> std::vector< size_t >::size_type"}, + { (char *)"delete_vector_size_t", (PyCFunction)_wrap_delete_vector_size_t, METH_O, (char *)"delete_vector_size_t(vector_size_t self)"}, + { (char *)"vector_size_t_swigregister", vector_size_t_swigregister, METH_VARARGS, NULL}, + { (char *)"vector_size_t_swiginit", vector_size_t_swiginit, METH_VARARGS, NULL}, { (char *)"get_parallel_threads", (PyCFunction)_wrap_get_parallel_threads, METH_NOARGS, (char *)"get_parallel_threads() -> int"}, { (char *)"set_parallel_threads", (PyCFunction) _wrap_set_parallel_threads, METH_VARARGS | METH_KEYWORDS, (char *)"set_parallel_threads(int numthreads) -> int"}, { (char *)"new_cubicspline", (PyCFunction) _wrap_new_cubicspline, METH_VARARGS | METH_KEYWORDS, (char *)"\n" @@ -78526,8 +88276,11 @@ static PyMethodDef SwigMethods[] = { ":math:`e_s(T)` is calculated using cmf::atmosphere::vapor_pressure(double)\n" "\n" ""}, + { (char *)"watts_to_MJ", (PyCFunction) _wrap_watts_to_MJ, METH_VARARGS | METH_KEYWORDS, (char *)"watts_to_MJ(double Watts) -> double"}, + { (char *)"MJ_to_watts", (PyCFunction) _wrap_MJ_to_watts, METH_VARARGS | METH_KEYWORDS, (char *)"MJ_to_watts(double MJ) -> double"}, + { (char *)"extraterrestrial_radiation", (PyCFunction) _wrap_extraterrestrial_radiation, METH_VARARGS | METH_KEYWORDS, (char *)"extraterrestrial_radiation(Time t, double longitude=8, double latitude=51, double time_zone=1, bool daily=False) -> double"}, { (char *)"global_radiation", (PyCFunction) _wrap_global_radiation, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "global_radiation(Time t, double height, double sunshine_fraction, double longitude=8, double latitude=51, double time_zone=1, bool daily=False) -> double\n" + "global_radiation(double Ra, double height, double sunshine_fraction) -> double\n" "\n" "double\n" "cmf::atmosphere::global_radiation(cmf::math::Time t, double height,\n" @@ -78624,6 +88377,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Weather_sunshine_get", (PyCFunction)_wrap_Weather_sunshine_get, METH_O, (char *)"Weather_sunshine_get(Weather self) -> double"}, { (char *)"Weather_Rs_set", _wrap_Weather_Rs_set, METH_VARARGS, (char *)"Weather_Rs_set(Weather self, double Rs)"}, { (char *)"Weather_Rs_get", (PyCFunction)_wrap_Weather_Rs_get, METH_O, (char *)"Weather_Rs_get(Weather self) -> double"}, + { (char *)"Weather_Ra_set", _wrap_Weather_Ra_set, METH_VARARGS, (char *)"Weather_Ra_set(Weather self, double Ra)"}, + { (char *)"Weather_Ra_get", (PyCFunction)_wrap_Weather_Ra_get, METH_O, (char *)"Weather_Ra_get(Weather self) -> double"}, { (char *)"Weather_daylength_set", _wrap_Weather_daylength_set, METH_VARARGS, (char *)"Weather_daylength_set(Weather self, double daylength)"}, { (char *)"Weather_daylength_get", (PyCFunction)_wrap_Weather_daylength_get, METH_O, (char *)"Weather_daylength_get(Weather self) -> double"}, { (char *)"Weather_instrument_height_set", _wrap_Weather_instrument_height_set, METH_VARARGS, (char *)"Weather_instrument_height_set(Weather self, double instrument_height)"}, @@ -78665,7 +88420,7 @@ static PyMethodDef SwigMethods[] = { "calculated \n" ""}, { (char *)"new_Weather", (PyCFunction) _wrap_new_Weather, METH_VARARGS | METH_KEYWORDS, (char *)"\n" - "new_Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double daylength=12) -> Weather\n" + "new_Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double Ra=30, double daylength=12) -> Weather\n" "\n" "Weather(double T=15.0, double Tmax=17.0, double Tmin=13.0, double\n" "rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double\n" @@ -82607,6 +92362,16 @@ static PyMethodDef SwigMethods[] = { { (char *)"CVodeIntegrator_MaxOrder_get", (PyCFunction)_wrap_CVodeIntegrator_MaxOrder_get, METH_O, (char *)"CVodeIntegrator_MaxOrder_get(CVodeIntegrator self) -> int"}, { (char *)"CVodeIntegrator_max_step_set", _wrap_CVodeIntegrator_max_step_set, METH_VARARGS, (char *)"CVodeIntegrator_max_step_set(CVodeIntegrator self, Time max_step)"}, { (char *)"CVodeIntegrator_max_step_get", (PyCFunction)_wrap_CVodeIntegrator_max_step_get, METH_O, (char *)"CVodeIntegrator_max_step_get(CVodeIntegrator self) -> Time"}, + { (char *)"CVodeIntegrator_get_order", (PyCFunction)_wrap_CVodeIntegrator_get_order, METH_O, (char *)"\n" + "CVodeIntegrator_get_order(CVodeIntegrator self) -> int\n" + "\n" + "int\n" + "get_order() const\n" + "\n" + "Returns the last order of the solver used, may be smaller than\n" + "MaxOrder due to the number of steps already taken or to fullfill\n" + "stability limit. \n" + ""}, { (char *)"CVodeIntegrator_initialize", (PyCFunction)_wrap_CVodeIntegrator_initialize, METH_O, (char *)"\n" "CVodeIntegrator_initialize(CVodeIntegrator self)\n" "\n" @@ -82673,7 +92438,6 @@ static PyMethodDef SwigMethods[] = { "\n" "virtual ~CVodeIntegrator() \n" ""}, - { (char *)"CVodeIntegrator_order_get", (PyCFunction)_wrap_CVodeIntegrator_order_get, METH_O, (char *)"CVodeIntegrator_order_get(CVodeIntegrator self) -> int"}, { (char *)"CVodeIntegrator_swigregister", CVodeIntegrator_swigregister, METH_VARARGS, NULL}, { (char *)"CVodeIntegrator_swiginit", CVodeIntegrator_swiginit, METH_VARARGS, NULL}, { (char *)"MultiIntegrator_copy", (PyCFunction)_wrap_MultiIntegrator_copy, METH_O, (char *)"\n" @@ -83141,6 +92905,14 @@ static void *_p_cmf__upslope__connections__Richards_lateralTo_p_cmf__upslope__co static void *_p_cmf__upslope__connections__DarcyTo_p_cmf__upslope__connections__lateral_sub_surface_flux(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((cmf::upslope::connections::lateral_sub_surface_flux *) ((cmf::upslope::connections::Darcy *) x)); } +static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); +} +static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { + *newmemory = SWIG_CAST_NEW_MEMORY; + return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); +} static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__water__WaterStorage_t(void *x, int *newmemory) { *newmemory = SWIG_CAST_NEW_MEMORY; return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); @@ -83165,14 +92937,6 @@ static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_pt *newmemory = SWIG_CAST_NEW_MEMORY; return (void *) new std::shared_ptr< cmf::water::WaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); } -static void *_p_std__shared_ptrT_cmf__river__Reach_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::river::Reach > *)x); -} -static void *_p_std__shared_ptrT_cmf__upslope__SurfaceWater_tTo_p_std__shared_ptrT_cmf__river__OpenWaterStorage_t(void *x, int *newmemory) { - *newmemory = SWIG_CAST_NEW_MEMORY; - return (void *) new std::shared_ptr< cmf::river::OpenWaterStorage >(*(std::shared_ptr< cmf::upslope::SurfaceWater > *)x); -} static void *_p_std__shared_ptrT_cmf__water__SystemBridge_tTo_p_std__shared_ptrT_cmf__water__flux_node_t(void *x, int *newmemory) { *newmemory = SWIG_CAST_NEW_MEMORY; return (void *) new std::shared_ptr< cmf::water::flux_node >(*(std::shared_ptr< cmf::water::SystemBridge > *)x); @@ -83406,6 +93170,7 @@ static void *_p_cmf__water__FreundlichAdsorbtionTo_p_cmf__water__Adsorption(void static void *_p_cmf__water__LangmuirAdsorptionTo_p_cmf__water__Adsorption(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((cmf::water::Adsorption *) ((cmf::water::LangmuirAdsorption *) x)); } +static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_cmf__atmosphere__ConstantMeteorology = {"_p_cmf__atmosphere__ConstantMeteorology", "cmf::atmosphere::ConstantMeteorology *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_cmf__atmosphere__ConstantRainSource = {"_p_cmf__atmosphere__ConstantRainSource", "cmf::atmosphere::ConstantRainSource *", 0, 0, (void*)0, 0}; @@ -83563,10 +93328,17 @@ static swig_type_info _swigt__p_cmf__water__statecontrol_connection = {"_p_cmf__ static swig_type_info _swigt__p_cmf__water__waterbalance_connection = {"_p_cmf__water__waterbalance_connection", "cmf::water::waterbalance_connection *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_cmf__water__waterbalance_integrator = {"_p_cmf__water__waterbalance_integrator", "cmf::water::waterbalance_integrator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_const_iterator = {"_p_const_iterator", "const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "real *|double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void = {"_p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void", "cmf::upslope::connectorfunction|void (*)(cmf::upslope::Cell &,cmf::upslope::Cell &,ptrdiff_t)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_iterator = {"_p_iterator", "iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ptr = {"_p_ptr", "ptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_size_t_t = {"_p_std__allocatorT_size_t_t", "std::vector< size_t >::allocator_type *|std::allocator< size_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__shared_ptrT_SoilLayer_t = {"_p_std__shared_ptrT_SoilLayer_t", "std::shared_ptr< SoilLayer > *|cmf::upslope::layer_ptr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t = {"_p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t", "std::shared_ptr< cmf::atmosphere::ConstantRainSource > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t = {"_p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t", "std::shared_ptr< cmf::atmosphere::IDWRainfall > *", 0, 0, (void*)0, 0}; @@ -83598,11 +93370,17 @@ static swig_type_info _swigt__p_std__shared_ptrT_cmf__water__waterbalance_integr static swig_type_info _swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t = {"_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t", "std::shared_ptr< std::shared_ptr< cmf::atmosphere::ConstantRainSource > > *|std::shared_ptr< cmf::atmosphere::ConstantRainSource::ptr > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t = {"_p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t", "std::shared_ptr< std::shared_ptr< cmf::atmosphere::RainfallStationReference > > *|std::shared_ptr< cmf::atmosphere::RainfallStationReference::ptr > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *|cmf::bytestring *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t = {"_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t", "std::vector< std::shared_ptr< cmf::water::WaterStorage > > *|cmf::water::storage_vector *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator", "cmf::water::connection_list::const_iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection > >::const_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator", "cmf::water::connection_list::iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t = {"_p_std__vectorT_size_t_std__allocatorT_size_t_t_t", "std::vector< size_t,std::allocator< size_t > > *|std::vector< size_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t = {"_p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t", "std::vector< std::shared_ptr< cmf::water::WaterStorage >,std::allocator< std::shared_ptr< cmf::water::WaterStorage > > > *|cmf::water::storage_vector *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator", "cmf::water::connection_list::const_iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection >,std::allocator< std::shared_ptr< cmf::water::flux_connection > > >::const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator = {"_p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator", "cmf::water::connection_list::iterator *|std::vector< std::shared_ptr< cmf::water::flux_connection >,std::allocator< std::shared_ptr< cmf::water::flux_connection > > >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { + &_swigt__p_allocator_type, &_swigt__p_char, &_swigt__p_cmf__atmosphere__ConstantMeteorology, &_swigt__p_cmf__atmosphere__ConstantRainSource, @@ -83760,10 +93538,17 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_cmf__water__waterbalance_connection, &_swigt__p_cmf__water__waterbalance_integrator, &_swigt__p_const_iterator, + &_swigt__p_difference_type, &_swigt__p_double, &_swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, &_swigt__p_iterator, + &_swigt__p_p_PyObject, &_swigt__p_ptr, + &_swigt__p_size_type, + &_swigt__p_std__allocatorT_double_t, + &_swigt__p_std__allocatorT_int_t, + &_swigt__p_std__allocatorT_size_t_t, + &_swigt__p_std__invalid_argument, &_swigt__p_std__shared_ptrT_SoilLayer_t, &_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, &_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, @@ -83795,11 +93580,17 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, &_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, &_swigt__p_std__string, - &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, - &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, - &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, + &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, + &_swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, + &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t, + &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator, + &_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator, + &_swigt__p_swig__SwigPyIterator, + &_swigt__p_value_type, }; +static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_cmf__atmosphere__ConstantMeteorology[] = { {&_swigt__p_cmf__atmosphere__ConstantMeteorology, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_cmf__atmosphere__ConstantRainSource[] = { {&_swigt__p_cmf__atmosphere__ConstantRainSource, 0, 0, 0},{0, 0, 0, 0}}; @@ -83957,10 +93748,17 @@ static swig_cast_info _swigc__p_cmf__water__statecontrol_connection[] = { {&_sw static swig_cast_info _swigc__p_cmf__water__waterbalance_connection[] = { {&_swigt__p_cmf__water__waterbalance_connection, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_cmf__water__waterbalance_integrator[] = { {&_swigt__p_cmf__water__waterbalance_integrator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_const_iterator[] = { {&_swigt__p_const_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void[] = { {&_swigt__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_iterator[] = { {&_swigt__p_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ptr[] = { {&_swigt__p_ptr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_double_t[] = { {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_size_t_t[] = { {&_swigt__p_std__allocatorT_size_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__shared_ptrT_SoilLayer_t[] = { {&_swigt__p_std__shared_ptrT_SoilLayer_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t[] = { {&_swigt__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -83992,11 +93790,17 @@ static swig_cast_info _swigc__p_std__shared_ptrT_cmf__water__waterbalance_integr static swig_cast_info _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t[] = { {&_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t[] = { {&_swigt__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = { {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_size_t_std__allocatorT_size_t_t_t[] = { {&_swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator[] = { {&_swigt__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { + _swigc__p_allocator_type, _swigc__p_char, _swigc__p_cmf__atmosphere__ConstantMeteorology, _swigc__p_cmf__atmosphere__ConstantRainSource, @@ -84154,10 +93958,17 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_cmf__water__waterbalance_connection, _swigc__p_cmf__water__waterbalance_integrator, _swigc__p_const_iterator, + _swigc__p_difference_type, _swigc__p_double, _swigc__p_f_r_cmf__upslope__Cell_r_cmf__upslope__Cell_ptrdiff_t__void, _swigc__p_iterator, + _swigc__p_p_PyObject, _swigc__p_ptr, + _swigc__p_size_type, + _swigc__p_std__allocatorT_double_t, + _swigc__p_std__allocatorT_int_t, + _swigc__p_std__allocatorT_size_t_t, + _swigc__p_std__invalid_argument, _swigc__p_std__shared_ptrT_SoilLayer_t, _swigc__p_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t, _swigc__p_std__shared_ptrT_cmf__atmosphere__IDWRainfall_t, @@ -84189,9 +94000,14 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__ConstantRainSource_t_t, _swigc__p_std__shared_ptrT_std__shared_ptrT_cmf__atmosphere__RainfallStationReference_t_t, _swigc__p_std__string, - _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_t, - _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__const_iterator, - _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_t__iterator, + _swigc__p_std__vectorT_double_std__allocatorT_double_t_t, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, + _swigc__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, + _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__WaterStorage_t_std__allocatorT_std__shared_ptrT_cmf__water__WaterStorage_t_t_t, + _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__const_iterator, + _swigc__p_std__vectorT_std__shared_ptrT_cmf__water__flux_connection_t_std__allocatorT_std__shared_ptrT_cmf__water__flux_connection_t_t_t__iterator, + _swigc__p_swig__SwigPyIterator, + _swigc__p_value_type, }; diff --git a/cmf/cmf_core_src/upslope/vegetation/ET.cpp b/cmf/cmf_core_src/upslope/vegetation/ET.cpp index e3183a93..62e346a4 100644 --- a/cmf/cmf_core_src/upslope/vegetation/ET.cpp +++ b/cmf/cmf_core_src/upslope/vegetation/ET.cpp @@ -1,329 +1,322 @@ - - -// Copyright 2010 by Philipp Kraft -// This file is part of cmf. -// -// cmf is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// cmf is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with cmf. If not, see . -// -#include "ET.h" - -namespace cmf { - namespace upslope { - namespace ET { - - real PenmanMonteith(real Rn,real ra,real rs,real T,real vap_press_deficit) - { - using namespace cmf::atmosphere; - ra/=cmf::math::day.AsSeconds(); // Convert resistances from s/m to day/m - rs/=cmf::math::day.AsSeconds(); - real - c_p_rho = 1.240e-3, // volumetric heat capacity (MJ/(m3 k)) - lambda = 2.45, // latent heat of vaporization (MJ/kg) - // Slope of vapor pressure (kPa/degC) (FAO 1998, Eq. 13) - Delta = 4098*0.6108 * exp(17.27*T/(T+237.3)) / ((T+237.3)*(T+237.3)), - gamma = 0.067, // psychrometric constant [kPa/k] - nominator = rs>0 ? Delta + gamma * (1+rs/ra) : Delta+gamma, - radTerm = Delta * Rn /(nominator * lambda), - aeroTerm = c_p_rho/nominator * vap_press_deficit/ra, - et_pot=(radTerm+aeroTerm); - return et_pot<0 ? 0 : et_pot; - } - real PenmanMonteith(cmf::atmosphere::Weather A,const cmf::upslope::vegetation::Vegetation & veg,double h) - { - if (veg.LAI<=0 && veg.StomatalResistance>0) - return 0.0; - - using namespace cmf::atmosphere; - double - c_p = 1.013e-3, // specific heat at constant pressure (MJ/(kg k)) - lambda = 2.45, // latent heat of vaporization (MJ/kg) - epsilon = 0.622, // ratio molecular weight of water vapour/dry air - R = 0.287, // Specific gas constant (kJ/(kg*k)) - // Soil heat flux - Delta = 4098*0.6108 - * exp(17.27*A.T/(A.T+237.3)) - / ((A.T+237.3)*(A.T+237.3)), // Slope of vapor pressure (kPa/degC) (FAO 1998, Eq. 13) - Rn = A.Rn(veg.albedo), // Net radiation flux - G = 0, - // G = SingleMeteorology->daily ? 0 // If calculation takes place on daily basis, the soil heat flux is 0 (FAO 1998,Eq. 42) - // : Rn>0 ? 0.1*Rn : 0.5 * Rn, // On a shorter basis, it is proportional to Rn, different for day and night (FAO 1998,Eq. 45f) - P=cmf::atmosphere::Pressure(h), // Mean Pressure in kPa - gamma=c_p*P/(epsilon*lambda), // psychrometric constant [kPa �C-1] - rho_a=P/(1.01*(A.T+273)*R), // mean air density at constant pressure - d=0.666667*h, // zero plane displacement height - z_om=0.123*h, // roughness length governing momentum transfer - z_oh=0.1*z_om, // roughness length governing transfer of heat and vapour - k2=0.1681, // von Karman's constant squared (0.41^2=0.1681) - ra_u = log((h+2-d)/z_om) - * log((h+2-d)/z_oh) - / k2, // Aerodynamic resistence * Windspeed - ra=ra_u/A.Windspeed, // Aerodynamic resistence - rs=(veg.StomatalResistance<=0) // Surface resistance - ? 0 - : veg.StomatalResistance * 2 / veg.LAI, - nominator = Delta + gamma * (1+rs/ra), - radTerm = Delta * (Rn - G)/(nominator * lambda), - aeroTermCoeff = cmf::math::day.AsSeconds() * epsilon * 3.486/ra_u/1.01, - aeroTerm = gamma/nominator * aeroTermCoeff / (A.T+273)*A.Windspeed*(A.e_s-A.e_a), - et_pot=(radTerm+aeroTerm); - return et_pot<0 ? 0 : et_pot; - } - - real stressedET::Tact( real Tpot ) const - { - return m_stressfunction->Tact(this,Tpot) ; - - } - - stressedET::stressedET( cmf::upslope::SoilLayer::ptr source,cmf::water::flux_node::ptr ET_target,std::string _type ) - : flux_connection(source,ET_target,_type), m_stressfunction(new SuctionStress()) - { - NewNodes(); - } - - - real constantETpot::calc_q( cmf::math::Time t ) - { - cmf::upslope::SoilLayer::ptr layer=sw.lock(); - const cmf::upslope::vegetation::Vegetation& veg=layer->cell.vegetation; - return Tact(ETpot_value); - } - real timeseriesETpot::calc_q( cmf::math::Time t ) - { - cmf::upslope::SoilLayer::ptr layer=sw.lock(); - const cmf::upslope::vegetation::Vegetation & veg=layer->cell.vegetation; - return Tact(ETpot(t)); - } - - - real PenmanMonteithET::r_s( const cmf::upslope::vegetation::Vegetation & veg ) - { - if (veg.StomatalResistance) - return veg.StomatalResistance/(0.5*veg.LAI); - else - return 0.0; - } - - real PenmanMonteithET::r_a( cmf::atmosphere::Weather A,real veg_height ) - { - real - h=veg_height, - d=0.666667*h, // zero plane displacement height - z_om=0.123*h, // roughness length governing momentum transfer - z_oh=0.1*z_om, // roughness length governing transfer of heat and vapour - k2=0.1681, // von Karman's constant squared (0.41^2=0.1681) - ra_u = log((h+A.instrument_height-d)/z_om) - * log((h+A.instrument_height-d)/z_oh) - / k2; // Aerodynamic resistence * Windspeed - return ra_u/maximum(A.Windspeed,0.5); // Aerodynamic resistence - } - real PenmanMonteithET::ETpot(cmf::math::Time t) const { - cmf::upslope::SoilLayer::ptr layer = sw.lock(); - cmf::upslope::Cell & cell = layer->cell; - cmf::atmosphere::Weather A = cell.get_weather(t); - cmf::upslope::vegetation::Vegetation veg = cell.vegetation; - real - Rn = A.Rn(veg.albedo, daily), // Net radiation flux - G = daily ? 0 // If calculation takes place on daily basis, the soil heat flux is 0 (FAO 1998,Eq. 42) - : Rn>0 ? 0.1*Rn : 0.5 * Rn, // On a shorter basis, it is proportional to Rn, different for day and night (FAO 1998,Eq. 45f) - PM = PenmanMonteith(Rn - G, r_a(A, veg.Height), r_s(veg), A.T, A.e_s - A.e_a); - return PM; - } - real PenmanMonteithET::calc_q( cmf::math::Time t ) - { - real PM = ETpot(t); - cmf::upslope::SoilLayer::ptr layer = sw.lock(); - cmf::upslope::Cell & cell = layer->cell; - return Tact(PM) * (1 - cell.leave_wetness()); - } - - void PenmanMonteithET::use_for_cell( cmf::upslope::Cell & cell ) - { - for (int i = 0; i < cell.layer_count() ; ++i) - { - new PenmanMonteithET(cell.get_layer(i),cell.get_transpiration()); - } - } - real CanopyStorageEvaporation::calc_q( cmf::math::Time t ) - { - cmf::water::WaterStorage::ptr canopy=c_stor.lock(); - if (left_node()->is_empty()>=1.0) return 0; - cmf::atmosphere::Weather w=m_cell.get_weather(t); - cmf::upslope::vegetation::Vegetation veg=m_cell.vegetation; - real PM=PenmanMonteith(w,veg,m_cell.z)*0.001*m_cell.get_area(); - return PM * m_cell.leave_wetness(); - } - - real HargreaveET::calc_q( cmf::math::Time t ) - { - double pi=cmf::geometry::PI; - cmf::upslope::SoilLayer::ptr layer = get_layer(); - cmf::atmosphere::Weather A=layer->cell.get_weather(t); - cmf::upslope::vegetation::Vegetation veg=layer->cell.vegetation; - double etrc = ETpot(t); - - return Tact(etrc*veg.LAI/2.88) * (1-layer->cell.leave_wetness()); - - } - - void HargreaveET::use_for_cell( cmf::upslope::Cell & cell ) - { - for (int i = 0; i < cell.layer_count() ; ++i) - { - new HargreaveET(cell.get_layer(i),cell.get_transpiration()); - } - } - real HargreaveET::ETpot(cmf::math::Time t) const - { - double pi = cmf::geometry::PI; - cmf::upslope::SoilLayer::ptr layer = get_layer(); - cmf::atmosphere::Weather A = layer->cell.get_weather(t); - cmf::upslope::vegetation::Vegetation veg = layer->cell.vegetation; - double - // Latitude in radians - phi = pi * lat / 180.0, - //solar declination (radians) - gamma = 0.4039f * sin((2 * pi / 365 * t.AsDate().DOY()) - 1.405), - //sunset hour angle (radians) - ws = acos(-tan(phi) * tan(gamma)), - //relative distance between earth and sun - dr = 1 + 0.033 * cos((2 * pi / 365 * t.AsDate().DOY())), - //s0 = extraterrestrial solar radiation mm/day - s0 = 15.392 * dr * (ws * sin(phi) * sin(gamma) + cos(phi) * cos(gamma) * sin(ws)), - //difference between mean monthly min and max temperatures - an estimate! - TD = fabs(A.Tmax - A.Tmin), - // Continentality factor, ranging between 0.19 (coastal regions) and 0.162 - // Calculated according to Z. Samani, see http://cagesun.nmsu.edu/~zsamani/research_material/files/Hargreaves-samani.pdf - KT = 0.00185*(TD*TD) - 0.0433 * TD + 0.4023, - //gives reference crop et in m / d - etrc = 0.0135 * KT * s0 * sqrt(TD) * (A.T + 17.8); - - - return etrc; - } - real PenmanEvaporation::calc_q( cmf::math::Time t ) - { - cmf::river::OpenWaterStorage::ptr source=m_source.lock(); - if (left_node()->is_empty()>=1.0) return 0; - cmf::atmosphere::Weather w=m_meteo->get_weather(t); - real PM=PenmanMonteith(w.Rn(0.1),PenmanMonteithET::r_a(w,0.1),0.0,w.T,w.e_s-w.e_a) * 0.001 * source->wet_area(); - return minimum(source->get_state()*2/cmf::math::h.AsDays(),PM); - } - - PenmanEvaporation::PenmanEvaporation( cmf::river::OpenWaterStorage::ptr source,cmf::water::flux_node::ptr Evap_target,const cmf::atmosphere::Meteorology& meteo ) : cmf::water::flux_connection(source,Evap_target,"Penman evaporation from open water"), m_meteo(meteo.copy()) - { - NewNodes(); - } - - - - real TurcET::calc_q( cmf::math::Time t ) - { - cmf::upslope::SoilLayer::ptr layer = get_layer(); - cmf::upslope::vegetation::Vegetation veg = layer->cell.vegetation; - - real ETp = ETpot(t); - return Tact(ETp * veg.LAI/2.88) * (1-layer->cell.leave_wetness()); - } - - void TurcET::use_for_cell( cmf::upslope::Cell & cell ) - { - for (int i = 0; i < cell.layer_count() ; ++i) - { - new TurcET(cell.get_layer(i),cell.get_transpiration()); - } - - } - - real TurcET::ETpot(cmf::math::Time t) const - { - cmf::upslope::SoilLayer::ptr layer = get_layer(); - cmf::atmosphere::Weather A = layer->cell.get_weather(t); - cmf::upslope::vegetation::Vegetation veg = layer->cell.vegetation; - real - T = A.T, - RG = A.Rs * 100, - rH = 100 * A.e_a / A.e_s, - C = rH<50 ? 1 + ((50 - rH) / 70) : 1.0, - ETp = 0.0031 * C * (RG + 209) * (T / (T + 15)); - return ETp; - } - - - PriestleyTaylorET::PriestleyTaylorET( cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target,real _alpha/*=1.26*/ ) - : stressedET(source,ET_target,"Priestley-Taylor ET"), alpha(_alpha) { - } - - void PriestleyTaylorET::use_for_cell( cmf::upslope::Cell & cell ) - { - for (int i = 0; i < cell.layer_count() ; ++i) - { - new PriestleyTaylorET(cell.get_layer(i),cell.get_transpiration()); - } - - } - - real PriestleyTaylorET::ETpot(cmf::math::Time t) const - { - cmf::upslope::SoilLayer::ptr layer = sw.lock(); - cmf::upslope::Cell & cell = layer->cell; - cmf::atmosphere::Weather A = cell.get_weather(t); - cmf::upslope::vegetation::Vegetation veg = cell.vegetation; - real - Rn = A.Rn(veg.albedo, daily), // Net radiation flux - G = daily ? 0 // If calculation takes place on daily basis, the soil heat flux is 0 (FAO 1998,Eq. 42) - : Rn>0 ? 0.1*Rn : 0.5 * Rn, // On a shorter basis, it is proportional to Rn, different for day and night (FAO 1998,Eq. 45f) - c_p_rho = 1.240e-3, // volumetric heat capacity (MJ/(m3 k)) - lambda = 2.45, // latent heat of vaporization (MJ/kg) - // Slope of vapor pressure (kPa/degC) (FAO 1998, Eq. 13) - Delta = 4098 * 0.6108 * exp(17.27 * A.T / (A.T + 237.3)) / ((A.T + 237.3)*(A.T + 237.3)), - gamma = 0.067, // psychrometric constant [kPa/k] - radTerm = alpha * Delta / (Delta + gamma) * (Rn - G), - - PT = radTerm / lambda; - return PT; - } - - real PriestleyTaylorET::calc_q( cmf::math::Time t ) - { - cmf::upslope::SoilLayer::ptr layer=sw.lock(); - cmf::upslope::Cell & cell=layer->cell; - cmf::upslope::vegetation::Vegetation veg=cell.vegetation; - real PT = ETpot(t); - return Tact(PT * veg.LAI/2.88) * (1-cell.leave_wetness()); - - - } - - - } - } - - void atmosphere::log_wind_profile::get_aerodynamic_resistance( double & r_ag,double & r_ac, cmf::math::Time t ) const - { - cmf::atmosphere::Weather w = cell.get_weather(t); - cmf::upslope::vegetation::Vegetation& v = cell.vegetation; - double - h=v.Height, - d=0.666667*h, // zero plane displacement height - z_om=0.123*h, // roughness length governing momentum transfer - z_oh=0.1*z_om, // roughness length governing transfer of heat and vapour - k2=0.1681; // von Karman's constant squared (0.41^2=0.1681) - r_ac = (log((h+w.instrument_height-d)/z_om) - * log((h+w.instrument_height-d)/z_oh)) - / (k2 * w.Windspeed); // Aerodynamic resistence - double z0_g = 0.001 * cell.snow_coverage() + 0.05 * (1-cell.snow_coverage()); - r_ag = (log((h+w.instrument_height)/z0_g) * log((h+w.instrument_height)/(0.1*z0_g))) / (k2 * w.Windspeed); - } -} + + +// Copyright 2010 by Philipp Kraft +// This file is part of cmf. +// +// cmf is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// cmf is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with cmf. If not, see . +// +#include "ET.h" + +namespace cmf { + namespace upslope { + namespace ET { + + real PenmanMonteith(real Rn,real ra,real rs,real T,real vap_press_deficit) + { + using namespace cmf::atmosphere; + ra/=cmf::math::day.AsSeconds(); // Convert resistances from s/m to day/m + rs/=cmf::math::day.AsSeconds(); + real + c_p_rho = 1.240e-3, // volumetric heat capacity (MJ/(m3 k)) + lambda = 2.45, // latent heat of vaporization (MJ/kg) + // Slope of vapor pressure (kPa/degC) (FAO 1998, Eq. 13) + Delta = 4098*0.6108 * exp(17.27*T/(T+237.3)) / ((T+237.3)*(T+237.3)), + gamma = 0.067, // psychrometric constant [kPa/k] + nominator = rs>0 ? Delta + gamma * (1+rs/ra) : Delta+gamma, + radTerm = Delta * Rn /(nominator * lambda), + aeroTerm = c_p_rho/nominator * vap_press_deficit/ra, + et_pot=(radTerm+aeroTerm); + return et_pot<0 ? 0 : et_pot; + } + real PenmanMonteith(cmf::atmosphere::Weather A,const cmf::upslope::vegetation::Vegetation & veg,double h) + { + if (veg.LAI<=0 && veg.StomatalResistance>0) + return 0.0; + + using namespace cmf::atmosphere; + double + c_p = 1.013e-3, // specific heat at constant pressure (MJ/(kg k)) + lambda = 2.45, // latent heat of vaporization (MJ/kg) + epsilon = 0.622, // ratio molecular weight of water vapour/dry air + R = 0.287, // Specific gas constant (kJ/(kg*k)) + // Soil heat flux + Delta = 4098*0.6108 + * exp(17.27*A.T/(A.T+237.3)) + / ((A.T+237.3)*(A.T+237.3)), // Slope of vapor pressure (kPa/degC) (FAO 1998, Eq. 13) + Rn = A.Rn(veg.albedo), // Net radiation flux + G = 0, + // G = SingleMeteorology->daily ? 0 // If calculation takes place on daily basis, the soil heat flux is 0 (FAO 1998,Eq. 42) + // : Rn>0 ? 0.1*Rn : 0.5 * Rn, // On a shorter basis, it is proportional to Rn, different for day and night (FAO 1998,Eq. 45f) + P=cmf::atmosphere::Pressure(h), // Mean Pressure in kPa + gamma=c_p*P/(epsilon*lambda), // psychrometric constant [kPa �C-1] + rho_a=P/(1.01*(A.T+273)*R), // mean air density at constant pressure + d=0.666667*h, // zero plane displacement height + z_om=0.123*h, // roughness length governing momentum transfer + z_oh=0.1*z_om, // roughness length governing transfer of heat and vapour + k2=0.1681, // von Karman's constant squared (0.41^2=0.1681) + ra_u = log((h+2-d)/z_om) + * log((h+2-d)/z_oh) + / k2, // Aerodynamic resistence * Windspeed + ra=ra_u/A.Windspeed, // Aerodynamic resistence + rs=(veg.StomatalResistance<=0) // Surface resistance + ? 0 + : veg.StomatalResistance * 2 / veg.LAI, + nominator = Delta + gamma * (1+rs/ra), + radTerm = Delta * (Rn - G)/(nominator * lambda), + aeroTermCoeff = cmf::math::day.AsSeconds() * epsilon * 3.486/ra_u/1.01, + aeroTerm = gamma/nominator * aeroTermCoeff / (A.T+273)*A.Windspeed*(A.e_s-A.e_a), + et_pot=(radTerm+aeroTerm); + return et_pot<0 ? 0 : et_pot; + } + + real stressedET::Tact( real Tpot ) const + { + return m_stressfunction->Tact(this,Tpot) ; + + } + + stressedET::stressedET( cmf::upslope::SoilLayer::ptr source,cmf::water::flux_node::ptr ET_target,std::string _type ) + : flux_connection(source,ET_target,_type), m_stressfunction(new SuctionStress()) + { + NewNodes(); + } + + + real constantETpot::calc_q( cmf::math::Time t ) + { + cmf::upslope::SoilLayer::ptr layer=sw.lock(); + const cmf::upslope::vegetation::Vegetation& veg=layer->cell.vegetation; + return Tact(ETpot_value); + } + real timeseriesETpot::calc_q( cmf::math::Time t ) + { + cmf::upslope::SoilLayer::ptr layer=sw.lock(); + const cmf::upslope::vegetation::Vegetation & veg=layer->cell.vegetation; + return Tact(ETpot(t)); + } + + + real PenmanMonteithET::r_s( const cmf::upslope::vegetation::Vegetation & veg ) + { + if (veg.StomatalResistance) + return veg.StomatalResistance/(0.5*veg.LAI); + else + return 0.0; + } + + real PenmanMonteithET::r_a( cmf::atmosphere::Weather A,real veg_height ) + { + real + h=veg_height, + d=0.666667*h, // zero plane displacement height + z_om=0.123*h, // roughness length governing momentum transfer + z_oh=0.1*z_om, // roughness length governing transfer of heat and vapour + k2=0.1681, // von Karman's constant squared (0.41^2=0.1681) + ra_u = log((h+A.instrument_height-d)/z_om) + * log((h+A.instrument_height-d)/z_oh) + / k2; // Aerodynamic resistence * Windspeed + return ra_u/maximum(A.Windspeed,0.5); // Aerodynamic resistence + } + real PenmanMonteithET::ETpot(cmf::math::Time t) const { + cmf::upslope::SoilLayer::ptr layer = sw.lock(); + cmf::upslope::Cell & cell = layer->cell; + cmf::atmosphere::Weather A = cell.get_weather(t); + cmf::upslope::vegetation::Vegetation veg = cell.vegetation; + real + Rn = A.Rn(veg.albedo, daily), // Net radiation flux + G = daily ? 0 // If calculation takes place on daily basis, the soil heat flux is 0 (FAO 1998,Eq. 42) + : Rn>0 ? 0.1*Rn : 0.5 * Rn, // On a shorter basis, it is proportional to Rn, different for day and night (FAO 1998,Eq. 45f) + PM = PenmanMonteith(Rn - G, r_a(A, veg.Height), r_s(veg), A.T, A.e_s - A.e_a); + return PM; + } + real PenmanMonteithET::calc_q( cmf::math::Time t ) + { + real PM = ETpot(t); + cmf::upslope::SoilLayer::ptr layer = sw.lock(); + cmf::upslope::Cell & cell = layer->cell; + return Tact(PM) * (1 - cell.leave_wetness()); + } + + void PenmanMonteithET::use_for_cell( cmf::upslope::Cell & cell ) + { + for (int i = 0; i < cell.layer_count() ; ++i) + { + new PenmanMonteithET(cell.get_layer(i),cell.get_transpiration()); + } + } + real CanopyStorageEvaporation::calc_q( cmf::math::Time t ) + { + cmf::water::WaterStorage::ptr canopy=c_stor.lock(); + if (left_node()->is_empty()>=1.0) return 0; + cmf::atmosphere::Weather w=m_cell.get_weather(t); + cmf::upslope::vegetation::Vegetation veg=m_cell.vegetation; + real PM=PenmanMonteith(w,veg,m_cell.z)*0.001*m_cell.get_area(); + return PM * m_cell.leave_wetness(); + } + + real HargreaveET::calc_q( cmf::math::Time t ) + { + double pi=cmf::geometry::PI; + cmf::upslope::SoilLayer::ptr layer = get_layer(); + cmf::atmosphere::Weather A=layer->cell.get_weather(t); + cmf::upslope::vegetation::Vegetation veg=layer->cell.vegetation; + double etrc = ETpot(t); + + return Tact(etrc*veg.LAI/2.88) * (1-layer->cell.leave_wetness()); + + } + + void HargreaveET::use_for_cell( cmf::upslope::Cell & cell ) + { + for (int i = 0; i < cell.layer_count() ; ++i) + { + new HargreaveET(cell.get_layer(i),cell.get_transpiration()); + } + } + real HargreaveET::ETpot(cmf::math::Time t) const + { + double pi = cmf::geometry::PI; + cmf::upslope::SoilLayer::ptr layer = get_layer(); + cmf::atmosphere::Weather A = layer->cell.get_weather(t); + cmf::upslope::vegetation::Vegetation veg = layer->cell.vegetation; + double + lambda = 2.45, // Latent heat of vaporization in MJ/kg + //s0 = extraterrestrial solar radiation mm/day + s0 = A.Ra / lambda, + //difference between mean monthly min and max temperatures - an estimate! + TD = fabs(A.Tmax - A.Tmin), + // Continentality factor, ranging between 0.19 (coastal regions) and 0.162 + // Calculated according to Z. Samani, see http://cagesun.nmsu.edu/~zsamani/research_material/files/Hargreaves-samani.pdf + KT = 0.00185*(TD*TD) - 0.0433 * TD + 0.4023, + //gives reference crop et in m / d + etrc = 0.0135 * KT * s0 * sqrt(TD) * (A.T + 17.8); + + + return etrc; + } + real PenmanEvaporation::calc_q( cmf::math::Time t ) + { + cmf::river::OpenWaterStorage::ptr source=m_source.lock(); + if (left_node()->is_empty()>=1.0) return 0; + cmf::atmosphere::Weather w=m_meteo->get_weather(t); + real PM=PenmanMonteith(w.Rn(0.1),PenmanMonteithET::r_a(w,0.1),0.0,w.T,w.e_s-w.e_a) * 0.001 * source->wet_area(); + return minimum(source->get_state()*2/cmf::math::h.AsDays(),PM); + } + + PenmanEvaporation::PenmanEvaporation( cmf::river::OpenWaterStorage::ptr source,cmf::water::flux_node::ptr Evap_target,const cmf::atmosphere::Meteorology& meteo ) : cmf::water::flux_connection(source,Evap_target,"Penman evaporation from open water"), m_meteo(meteo.copy()) + { + NewNodes(); + } + + + + real TurcET::calc_q( cmf::math::Time t ) + { + cmf::upslope::SoilLayer::ptr layer = get_layer(); + cmf::upslope::vegetation::Vegetation veg = layer->cell.vegetation; + + real ETp = ETpot(t); + return Tact(ETp * veg.LAI/2.88) * (1-layer->cell.leave_wetness()); + } + + void TurcET::use_for_cell( cmf::upslope::Cell & cell ) + { + for (int i = 0; i < cell.layer_count() ; ++i) + { + new TurcET(cell.get_layer(i),cell.get_transpiration()); + } + + } + + real TurcET::ETpot(cmf::math::Time t) const + { + cmf::upslope::SoilLayer::ptr layer = get_layer(); + cmf::atmosphere::Weather A = layer->cell.get_weather(t); + cmf::upslope::vegetation::Vegetation veg = layer->cell.vegetation; + real + T = A.T, + RG = A.Rs * 100, + rH = 100 * A.e_a / A.e_s, + C = rH<50 ? 1 + ((50 - rH) / 70) : 1.0, + ETp = 0.0031 * C * (RG + 209) * (T / (T + 15)); + return ETp; + } + + + PriestleyTaylorET::PriestleyTaylorET( cmf::upslope::SoilLayer::ptr source, cmf::water::flux_node::ptr ET_target,real _alpha/*=1.26*/ ) + : stressedET(source,ET_target,"Priestley-Taylor ET"), alpha(_alpha) { + } + + void PriestleyTaylorET::use_for_cell( cmf::upslope::Cell & cell ) + { + for (int i = 0; i < cell.layer_count() ; ++i) + { + new PriestleyTaylorET(cell.get_layer(i),cell.get_transpiration()); + } + + } + + real PriestleyTaylorET::ETpot(cmf::math::Time t) const + { + cmf::upslope::SoilLayer::ptr layer = sw.lock(); + cmf::upslope::Cell & cell = layer->cell; + cmf::atmosphere::Weather A = cell.get_weather(t); + cmf::upslope::vegetation::Vegetation veg = cell.vegetation; + real + Rn = A.Rn(veg.albedo, daily), // Net radiation flux + G = daily ? 0 // If calculation takes place on daily basis, the soil heat flux is 0 (FAO 1998,Eq. 42) + : Rn>0 ? 0.1*Rn : 0.5 * Rn, // On a shorter basis, it is proportional to Rn, different for day and night (FAO 1998,Eq. 45f) + c_p_rho = 1.240e-3, // volumetric heat capacity (MJ/(m3 k)) + lambda = 2.45, // latent heat of vaporization (MJ/kg) + // Slope of vapor pressure (kPa/degC) (FAO 1998, Eq. 13) + Delta = 4098 * 0.6108 * exp(17.27 * A.T / (A.T + 237.3)) / ((A.T + 237.3)*(A.T + 237.3)), + gamma = 0.067, // psychrometric constant [kPa/k] + radTerm = alpha * Delta / (Delta + gamma) * (Rn - G), + + PT = radTerm / lambda; + return PT; + } + + real PriestleyTaylorET::calc_q( cmf::math::Time t ) + { + cmf::upslope::SoilLayer::ptr layer=sw.lock(); + cmf::upslope::Cell & cell=layer->cell; + cmf::upslope::vegetation::Vegetation veg=cell.vegetation; + real PT = ETpot(t); + return Tact(PT * veg.LAI/2.88) * (1-cell.leave_wetness()); + + + } + + + } + } + + void atmosphere::log_wind_profile::get_aerodynamic_resistance( double & r_ag,double & r_ac, cmf::math::Time t ) const + { + cmf::atmosphere::Weather w = cell.get_weather(t); + cmf::upslope::vegetation::Vegetation& v = cell.vegetation; + double + h=v.Height, + d=0.666667*h, // zero plane displacement height + z_om=0.123*h, // roughness length governing momentum transfer + z_oh=0.1*z_om, // roughness length governing transfer of heat and vapour + k2=0.1681; // von Karman's constant squared (0.41^2=0.1681) + r_ac = (log((h+w.instrument_height-d)/z_om) + * log((h+w.instrument_height-d)/z_oh)) + / (k2 * w.Windspeed); // Aerodynamic resistence + double z0_g = 0.001 * cell.snow_coverage() + 0.05 * (1-cell.snow_coverage()); + r_ag = (log((h+w.instrument_height)/z0_g) * log((h+w.instrument_height)/(0.1*z0_g))) / (k2 * w.Windspeed); + } +}